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

Delta Between Two Patch Sets: state/apiserver/api_test.go

Issue 8626044: state/api: enable authentication
Left Patch Set: state/api: enable authentication Created 10 years, 11 months ago
Right Patch Set: state/api: enable authentication Created 10 years, 11 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « cmd/jujud/machine_test.go ('k') | state/apiserver/apiserver.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
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 }
LEFTRIGHT

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