Merge lp:~gz/goose/tool_test_weirdness into lp:goose
Proposed by
Martin Packman
Status: | Merged |
---|---|
Approved by: | Martin Packman |
Approved revision: | 120 |
Merged at revision: | 120 |
Proposed branch: | lp:~gz/goose/tool_test_weirdness |
Merge into: | lp:goose |
Diff against target: |
60 lines (+6/-7) 1 file modified
tools/secgroup-delete-all/main_test.go (+6/-7) |
To merge this branch: | bzr merge lp:~gz/goose/tool_test_weirdness |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+217962@code.launchpad.net |
Commit message
tools/secgroup-
Change tests to be in package main rather than main_test,
which may work around an odd issue on the landing bot.
https:/
R=axwalk, hduran-8
Description of the change
tools/secgroup-
Change tests to be in package main rather than main_test,
which may work around an odd issue on the landing bot.
To post a comment you must log in.
Reviewers: mp+217962_ code.launchpad. net,
Message:
Please take a look.
Description: delete- all: Change test package
tools/secgroup-
Change tests to be in package main rather than main_test,
which may work around an odd issue on the landing bot.
https:/ /code.launchpad .net/~gz/ goose/tool_ test_weirdness/ +merge/ 217962
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/91010044/
Affected files (+8, -7 lines): delete- all/main_ test.go
A [revision details]
M tools/secgroup-
Index: [revision details] 20140423072524- vxav71c7ko4lgtc u
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: tools/secgroup- delete- all/main_ test.go secgroup- delete- all/main_ test.go' delete- all/main_ test.go 2013-06-22 11:39:35 +0000 delete- all/main_ test.go 2014-05-01 18:04:32 +0000
=== modified file 'tools/
--- tools/secgroup-
+++ tools/secgroup-
@@ -1,4 +1,4 @@
-package main_test
+package main
import ( net/goose/ testing/ httpsuite" net/goose/ testservices/ hook" net/goose/ testservices/ openstackservic e" net/goose/ tools/secgroup- delete- all"
"bytes"
@@ -10,7 +10,6 @@
"launchpad.
"launchpad.
"launchpad.
- tool "launchpad.
"testing"
)
@@ -33,7 +32,7 @@
var _ = Suite(&ToolSuite{})
// GZ 2013-01-21: Should require EnvSuite for this, but clashes with t(creds *identity. Credentials) *nova.Client { tFromCreds( creds *identity. Credentials) *nova.Client { NewClient( creds, identity. AuthUserPass, nil) e.New(creds, identity. AuthUserPass) SetupHTTP( s.Mux) t(creds) tFromCreds( creds)
HTTPSuite
-func createNovaClien
+func createNovaClien
osc := client.
return nova.New(osc)
}
@@ -48,13 +47,13 @@
}
openstack := openstackservic
openstack.
- return openstack, createNovaClien
+ return openstack, createNovaClien
}
func (s *ToolSuite) TestNoGroups(c *C) { &buf, nova) string( buf.Bytes( )), Equals, "No security groups to delete.\n") CreateSecurityG roup("group- a", "A group") CreateSecurityG roup("group- b", "Another group") &buf, novaClient) string( buf.Bytes( )), Equals, "2 security groups deleted.\n") RegisterControl Point(" removeSecurityG roup", &buf, novaClient) string( buf.Bytes( )), Equals, "2 security groups deleted.\n1
_, nova := s.makeServices(c)
var buf bytes.Buffer
- err := tool.DeleteAll(
+ err := DeleteAll(&buf, nova)
c.Assert(err, IsNil)
c.Assert(
}
@@ -64,7 +63,7 @@
novaClient.
novaClient.
var buf bytes.Buffer
- err := tool.DeleteAll(
+ err := DeleteAll(&buf, novaClient)
c.Assert(err, IsNil)
c.Assert(
}
@@ -89,7 +88,7 @@
cleanup := os.Nova.
deleteGroupError)
defer cleanup()
var buf bytes.Buffer
- err := tool.DeleteAll(
+ err := DeleteAll(&buf, novaClient)
c.Assert(err, IsNil)
c.Assert(
security groups could not be deleted.\n")
}