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

Delta Between Two Patch Sets: environs/ec2/cloudinit_test.go

Issue 6347044: environs/ec2: bootstrap (Closed)
Left Patch Set: environs/ec2: bootstrap Created 11 years, 9 months ago
Right Patch Set: environs/ec2: bootstrap Created 11 years, 8 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 | « environs/ec2/cloudinit.go ('k') | environs/ec2/live_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
1 package ec2 1 package ec2
2 2
3 import ( 3 import (
4 . "launchpad.net/gocheck" 4 . "launchpad.net/gocheck"
5 "launchpad.net/goyaml" 5 "launchpad.net/goyaml"
6 "launchpad.net/juju-core/state" 6 "launchpad.net/juju-core/state"
7 "regexp" 7 "regexp"
8 "strings" 8 "strings"
9 ) 9 )
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 t.checkPackage(c, "zookeeperd") 54 t.checkPackage(c, "zookeeperd")
55 t.checkScripts(c, "jujud initzk") 55 t.checkScripts(c, "jujud initzk")
56 t.checkScripts(c, regexp.QuoteMeta(t.cfg.instanceIdAccessor)) 56 t.checkScripts(c, regexp.QuoteMeta(t.cfg.instanceIdAccessor))
57 t.checkScripts(c, "JUJU_ZOOKEEPER='localhost"+zkPortSuffix+"'") 57 t.checkScripts(c, "JUJU_ZOOKEEPER='localhost"+zkPortSuffix+"'")
58 } else { 58 } else {
59 t.checkScripts(c, "JUJU_ZOOKEEPER='"+strings.Join(t.cfg.stateInf o.Addrs, ",")+"'") 59 t.checkScripts(c, "JUJU_ZOOKEEPER='"+strings.Join(t.cfg.stateInf o.Addrs, ",")+"'")
60 } 60 }
61 t.checkScripts(c, "JUJU_MACHINE_ID=[0-9]+") 61 t.checkScripts(c, "JUJU_MACHINE_ID=[0-9]+")
62 62
63 if t.cfg.provisioner { 63 if t.cfg.provisioner {
64 » » t.checkScripts(c, "jujud provisioning") 64 » » t.checkScripts(c, "jujud provisioning --zookeeper-servers 'local host"+zkPortSuffix+"'")
65 } 65 }
66 66
67 // TODO check machine agent script. 67 // TODO check machine agent script.
68 } 68 }
69 69
70 func (t *cloudinitTest) checkScripts(c *C, pattern string) { 70 func (t *cloudinitTest) checkScripts(c *C, pattern string) {
71 CheckScripts(c, t.x, pattern, true) 71 CheckScripts(c, t.x, pattern, true)
72 } 72 }
73 73
74 // If match is true, CheckScripts checks that at least one script started 74 // If match is true, CheckScripts checks that at least one script started
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 c.Assert(err, IsNil) 205 c.Assert(err, IsNil)
206 206
207 for _, test := range verifyTests { 207 for _, test := range verifyTests {
208 cfg1 := *cfg 208 cfg1 := *cfg
209 test.mutate(&cfg1) 209 test.mutate(&cfg1)
210 t, err := newCloudInit(&cfg1) 210 t, err := newCloudInit(&cfg1)
211 c.Assert(err, ErrorMatches, "invalid machine configuration: "+te st.err) 211 c.Assert(err, ErrorMatches, "invalid machine configuration: "+te st.err)
212 c.Assert(t, IsNil) 212 c.Assert(t, IsNil)
213 } 213 }
214 } 214 }
LEFTRIGHT

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