Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1321)

Side by Side Diff: state/statecmd/addrelation_test.go

Issue 13606045: various: gocheck, checkers, imports fixes (Closed)
Patch Set: Created 11 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 Canonical Ltd. 1 // Copyright 2013 Canonical Ltd.
2 // Licensed under the AGPLv3, see LICENCE file for details. 2 // Licensed under the AGPLv3, see LICENCE file for details.
3 3
4 package statecmd_test 4 package statecmd_test
5 5
6 import ( 6 import (
7 gc "launchpad.net/gocheck" 7 gc "launchpad.net/gocheck"
8
8 "launchpad.net/juju-core/charm" 9 "launchpad.net/juju-core/charm"
9 "launchpad.net/juju-core/juju/testing" 10 "launchpad.net/juju-core/juju/testing"
10 "launchpad.net/juju-core/state/api/params" 11 "launchpad.net/juju-core/state/api/params"
11 "launchpad.net/juju-core/state/statecmd" 12 "launchpad.net/juju-core/state/statecmd"
12 ) 13 )
13 14
14 type AddRelationSuite struct { 15 type AddRelationSuite struct {
15 testing.JujuConnSuite 16 testing.JujuConnSuite
16 } 17 }
17 18
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 eps, err := s.State.InferEndpoints([]string{"wordpress", "mysql"}) 105 eps, err := s.State.InferEndpoints([]string{"wordpress", "mysql"})
105 c.Assert(err, gc.IsNil) 106 c.Assert(err, gc.IsNil)
106 _, err = s.State.AddRelation(eps...) 107 _, err = s.State.AddRelation(eps...)
107 c.Assert(err, gc.IsNil) 108 c.Assert(err, gc.IsNil)
108 // And try to add it again. 109 // And try to add it again.
109 _, err = statecmd.AddRelation(s.State, params.AddRelation{ 110 _, err = statecmd.AddRelation(s.State, params.AddRelation{
110 Endpoints: []string{"wordpress", "mysql"}, 111 Endpoints: []string{"wordpress", "mysql"},
111 }) 112 })
112 c.Assert(err, gc.ErrorMatches, `cannot add relation "wordpress:db mysql: server": relation already exists`) 113 c.Assert(err, gc.ErrorMatches, `cannot add relation "wordpress:db mysql: server": relation already exists`)
113 } 114 }
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b