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

Side by Side Diff: state/api/deployer/deployer_test.go

Issue 14619045: state: make Addresses use Machine.Addresses
Patch Set: state: make Addresses use Machine.Addresses Created 10 years, 5 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
« no previous file with comments | « state/address.go ('k') | state/api/provisioner/provisioner_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012, 2013 Canonical Ltd. 1 // Copyright 2012, 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 deployer_test 4 package deployer_test
5 5
6 import ( 6 import (
7 stdtesting "testing" 7 stdtesting "testing"
8 8
9 gc "launchpad.net/gocheck" 9 gc "launchpad.net/gocheck"
10 10
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 unit, err = s.st.Unit(s.subordinate.Tag()) 222 unit, err = s.st.Unit(s.subordinate.Tag())
223 c.Assert(err, gc.IsNil) 223 c.Assert(err, gc.IsNil)
224 err = unit.SetPassword("phony") 224 err = unit.SetPassword("phony")
225 c.Assert(err, gc.IsNil) 225 c.Assert(err, gc.IsNil)
226 err = s.subordinate.Refresh() 226 err = s.subordinate.Refresh()
227 c.Assert(err, gc.IsNil) 227 c.Assert(err, gc.IsNil)
228 c.Assert(s.subordinate.PasswordValid("phony"), gc.Equals, true) 228 c.Assert(s.subordinate.PasswordValid("phony"), gc.Equals, true)
229 } 229 }
230 230
231 func (s *deployerSuite) TestStateAddresses(c *gc.C) { 231 func (s *deployerSuite) TestStateAddresses(c *gc.C) {
232 testing.AddStateServerMachine(c, s.State)
233
232 stateAddresses, err := s.State.Addresses() 234 stateAddresses, err := s.State.Addresses()
233 c.Assert(err, gc.IsNil) 235 c.Assert(err, gc.IsNil)
234 236
235 addresses, err := s.st.StateAddresses() 237 addresses, err := s.st.StateAddresses()
236 c.Assert(err, gc.IsNil) 238 c.Assert(err, gc.IsNil)
237 c.Assert(addresses, gc.DeepEquals, stateAddresses) 239 c.Assert(addresses, gc.DeepEquals, stateAddresses)
238 } 240 }
239 241
240 func (s *deployerSuite) TestAPIAddresses(c *gc.C) { 242 func (s *deployerSuite) TestAPIAddresses(c *gc.C) {
241 » apiInfo := s.APIInfo(c) 243 » testing.AddStateServerMachine(c, s.State)
244
245 » apiAddresses, err := s.State.APIAddresses()
246 » c.Assert(err, gc.IsNil)
242 247
243 addresses, err := s.st.APIAddresses() 248 addresses, err := s.st.APIAddresses()
244 c.Assert(err, gc.IsNil) 249 c.Assert(err, gc.IsNil)
245 » c.Assert(addresses, gc.DeepEquals, apiInfo.Addrs) 250 » c.Assert(addresses, gc.DeepEquals, apiAddresses)
246 } 251 }
247 252
248 func (s *deployerSuite) TestCACert(c *gc.C) { 253 func (s *deployerSuite) TestCACert(c *gc.C) {
249 caCert, err := s.st.CACert() 254 caCert, err := s.st.CACert()
250 c.Assert(err, gc.IsNil) 255 c.Assert(err, gc.IsNil)
251 c.Assert(caCert, gc.DeepEquals, s.State.CACert()) 256 c.Assert(caCert, gc.DeepEquals, s.State.CACert())
252 } 257 }
OLDNEW
« no previous file with comments | « state/address.go ('k') | state/api/provisioner/provisioner_test.go » ('j') | no next file with comments »

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