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

Delta Between Two Patch Sets: cmd/juju/deploy_test.go

Issue 6553049: all: use MgoSuite rather than ZkSuite
Left Patch Set: Created 12 years, 6 months ago
Right Patch Set: all: use MgoSuite rather than ZkSuite Created 12 years, 6 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:
Right: Side by side diff | Download
« no previous file with change/comment | « cmd/juju/cmd_test.go ('k') | cmd/juju/main_test.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
(no file at all)
1 package main 1 package main
2 2
3 import ( 3 import (
4 "bytes" 4 "bytes"
5 "crypto/sha256" 5 "crypto/sha256"
6 "encoding/hex" 6 "encoding/hex"
7 "io/ioutil" 7 "io/ioutil"
8 . "launchpad.net/gocheck" 8 . "launchpad.net/gocheck"
9 "launchpad.net/juju-core/charm" 9 "launchpad.net/juju-core/charm"
10 "launchpad.net/juju-core/cmd" 10 "launchpad.net/juju-core/cmd"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 func (s *repoSuite) assertUnitMachines(c *C, units []*state.Unit) { 83 func (s *repoSuite) assertUnitMachines(c *C, units []*state.Unit) {
84 expectUnitNames := []string{} 84 expectUnitNames := []string{}
85 for _, u := range units { 85 for _, u := range units {
86 expectUnitNames = append(expectUnitNames, u.Name()) 86 expectUnitNames = append(expectUnitNames, u.Name())
87 } 87 }
88 sort.Strings(expectUnitNames) 88 sort.Strings(expectUnitNames)
89 89
90 machines, err := s.State.AllMachines() 90 machines, err := s.State.AllMachines()
91 c.Assert(err, IsNil) 91 c.Assert(err, IsNil)
92 // NOTE: this will fail when state.Initialize starts doing
93 // the right thing and poking machine 0 into ZK state.
94 c.Assert(machines, HasLen, len(units)) 92 c.Assert(machines, HasLen, len(units))
95 unitNames := []string{} 93 unitNames := []string{}
96 for _, m := range machines { 94 for _, m := range machines {
97 mUnits, err := m.Units() 95 mUnits, err := m.Units()
98 c.Assert(err, IsNil) 96 c.Assert(err, IsNil)
99 c.Assert(mUnits, HasLen, 1) 97 c.Assert(mUnits, HasLen, 1)
100 unitNames = append(unitNames, mUnits[0].Name()) 98 unitNames = append(unitNames, mUnits[0].Name())
101 } 99 }
102 sort.Strings(unitNames) 100 sort.Strings(unitNames)
103 c.Assert(unitNames, DeepEquals, expectUnitNames) 101 c.Assert(unitNames, DeepEquals, expectUnitNames)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 s.assertService(c, "dummy", curl, 13, 0) 176 s.assertService(c, "dummy", curl, 13, 0)
179 } 177 }
180 178
181 func (s *DeploySuite) TestSubordinateCharm(c *C) { 179 func (s *DeploySuite) TestSubordinateCharm(c *C) {
182 coretesting.Charms.BundlePath(s.seriesPath, "series", "logging") 180 coretesting.Charms.BundlePath(s.seriesPath, "series", "logging")
183 err := runDeploy(c, "local:logging") 181 err := runDeploy(c, "local:logging")
184 c.Assert(err, IsNil) 182 c.Assert(err, IsNil)
185 curl := charm.MustParseURL("local:precise/logging-1") 183 curl := charm.MustParseURL("local:precise/logging-1")
186 s.assertService(c, "logging", curl, 0, 0) 184 s.assertService(c, "logging", curl, 0, 0)
187 } 185 }
LEFTRIGHT

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