LEFT | RIGHT |
1 package apiserver_test | 1 package apiserver_test |
2 | 2 |
3 import ( | 3 import ( |
4 "errors" | 4 "errors" |
5 "fmt" | 5 "fmt" |
6 "io" | 6 "io" |
7 . "launchpad.net/gocheck" | 7 . "launchpad.net/gocheck" |
8 "launchpad.net/juju-core/charm" | 8 "launchpad.net/juju-core/charm" |
9 "launchpad.net/juju-core/constraints" | 9 "launchpad.net/juju-core/constraints" |
10 "launchpad.net/juju-core/juju/testing" | 10 "launchpad.net/juju-core/juju/testing" |
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 c.Assert(err, IsNil) | 1294 c.Assert(err, IsNil) |
1295 // Code under test: | 1295 // Code under test: |
1296 err = s.APIState.Client().Resolved("wordpress/0", false) | 1296 err = s.APIState.Client().Resolved("wordpress/0", false) |
1297 c.Assert(err, IsNil) | 1297 c.Assert(err, IsNil) |
1298 // Freshen the unit's state. | 1298 // Freshen the unit's state. |
1299 err = u.Refresh() | 1299 err = u.Refresh() |
1300 c.Assert(err, IsNil) | 1300 c.Assert(err, IsNil) |
1301 // And now the actual test assertions: we set the unit as resolved via | 1301 // And now the actual test assertions: we set the unit as resolved via |
1302 // the API so it should have a resolved mode set. | 1302 // the API so it should have a resolved mode set. |
1303 mode := u.Resolved() | 1303 mode := u.Resolved() |
1304 » c.Assert(mode, Equals, params.ResolvedNoHooks) | 1304 » c.Assert(mode, Equals, state.ResolvedNoHooks) |
1305 } | 1305 } |
1306 | 1306 |
1307 var serviceDeployTests = []struct { | 1307 var serviceDeployTests = []struct { |
1308 about string | 1308 about string |
1309 serviceName string | 1309 serviceName string |
1310 charmUrl string | 1310 charmUrl string |
1311 numUnits int | 1311 numUnits int |
1312 expectedNumUnits int | 1312 expectedNumUnits int |
1313 constraints constraints.Value | 1313 constraints constraints.Value |
1314 }{{ | 1314 }{{ |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1458 _, info, err := s.APIConn.Environ.StateInfo() | 1458 _, info, err := s.APIConn.Environ.StateInfo() |
1459 c.Assert(err, IsNil) | 1459 c.Assert(err, IsNil) |
1460 info.Tag = tag | 1460 info.Tag = tag |
1461 info.Password = fmt.Sprintf("%s password", tag) | 1461 info.Password = fmt.Sprintf("%s password", tag) |
1462 c.Logf("opening state; entity %q; password %q", info.Tag, info.Password) | 1462 c.Logf("opening state; entity %q; password %q", info.Tag, info.Password) |
1463 st, err := api.Open(info) | 1463 st, err := api.Open(info) |
1464 c.Assert(err, IsNil) | 1464 c.Assert(err, IsNil) |
1465 c.Assert(st, NotNil) | 1465 c.Assert(st, NotNil) |
1466 return st | 1466 return st |
1467 } | 1467 } |
LEFT | RIGHT |