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

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

Issue 6198064: environs: upload juju tools to cloud.
Left Patch Set: environs: upload juju tools to cloud. Created 12 years, 10 months ago
Right Patch Set: environs: upload juju tools to cloud. Created 12 years, 9 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 | « [revision details] ('k') | environs/dummy/environs.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 main_test 1 package main_test
2 2
3 import ( 3 import (
4 "io/ioutil" 4 "io/ioutil"
5 "launchpad.net/gnuflag" 5 "launchpad.net/gnuflag"
6 . "launchpad.net/gocheck" 6 . "launchpad.net/gocheck"
7 "launchpad.net/juju/go/cmd" 7 "launchpad.net/juju/go/cmd"
8 main "launchpad.net/juju/go/cmd/juju" 8 main "launchpad.net/juju/go/cmd/juju"
9 "launchpad.net/juju/go/environs" 9 "launchpad.net/juju/go/environs"
10 "launchpad.net/juju/go/environs/dummy" 10 "launchpad.net/juju/go/environs/dummy"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return 129 return
130 } 130 }
131 131
132 err = com.Run(cmd.DefaultContext()) 132 err = com.Run(cmd.DefaultContext())
133 errc <- err 133 errc <- err
134 }() 134 }()
135 return 135 return
136 } 136 }
137 137
138 func (*cmdSuite) TestBootstrapCommand(c *C) { 138 func (*cmdSuite) TestBootstrapCommand(c *C) {
139 defer dummy.Reset()
niemeyer 2012/05/21 21:29:10 Why is this necessary, considering that TearDownTe
rog 2012/05/22 09:00:58 Done.
140
141 // normal bootstrap 139 // normal bootstrap
142 opc, errc := runCommand(new(main.BootstrapCommand)) 140 opc, errc := runCommand(new(main.BootstrapCommand))
143 c.Check(<-opc, Equals, op(dummy.OpBootstrap, "peckham")) 141 c.Check(<-opc, Equals, op(dummy.OpBootstrap, "peckham"))
144 c.Check(<-errc, IsNil) 142 c.Check(<-errc, IsNil)
145 143
146 // bootstrap with tool uploading - checking that a file 144 // bootstrap with tool uploading - checking that a file
147 // is uploaded should be sufficient, as the detailed semantics 145 // is uploaded should be sufficient, as the detailed semantics
148 // of UploadTools are tested in environs. 146 // of UploadTools are tested in environs.
149 opc, errc = runCommand(new(main.BootstrapCommand), "--upload-tools") 147 opc, errc = runCommand(new(main.BootstrapCommand), "--upload-tools")
150 c.Check(<-opc, Equals, op(dummy.OpPutFile, "peckham")) 148 c.Check(<-opc, Equals, op(dummy.OpPutFile, "peckham"))
(...skipping 25 matching lines...) Expand all
176 c.Check((<-opc).Kind, Equals, dummy.OpNone) 174 c.Check((<-opc).Kind, Equals, dummy.OpNone)
177 c.Check(<-errc, ErrorMatches, `broken environment`) 175 c.Check(<-errc, ErrorMatches, `broken environment`)
178 } 176 }
179 177
180 func op(kind dummy.OperationKind, name string) dummy.Operation { 178 func op(kind dummy.OperationKind, name string) dummy.Operation {
181 return dummy.Operation{ 179 return dummy.Operation{
182 Env: name, 180 Env: name,
183 Kind: kind, 181 Kind: kind,
184 } 182 }
185 } 183 }
LEFTRIGHT

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