Merge lp:~axwalk/juju-core/lp1303583-provider-azure-tests-gccgo into lp:~go-bot/juju-core/trunk
Proposed by
Andrew Wilkins
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Andrew Wilkins | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 2765 | ||||
Proposed branch: | lp:~axwalk/juju-core/lp1303583-provider-azure-tests-gccgo | ||||
Merge into: | lp:~go-bot/juju-core/trunk | ||||
Diff against target: |
67 lines (+10/-6) 2 files modified
provider/azure/environ.go (+5/-1) provider/azure/environ_test.go (+5/-5) |
||||
To merge this branch: | bzr merge lp:~axwalk/juju-core/lp1303583-provider-azure-tests-gccgo | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+220552@code.launchpad.net |
Commit message
provider/azure: fix tests for go1.3/gccgo
Fix a test to use SameContents instead of DeepEquals.
Also, make StopInstances deterministic; it now stops
instances in the order of IDs specified. One of the
StopInstances tests was sending responses in the wrong
order, and that has been rectified.
Fixes lp:1303583
Description of the change
provider/azure: fix tests for go1.3/gccgo
Fix a test to use SameContents instead of DeepEquals.
Also, make StopInstances deterministic; it now stops
instances in the order of IDs specified. One of the
StopInstances tests was sending responses in the wrong
order, and that has been rectified.
Fixes lp:1303583
To post a comment you must log in.
Reviewers: mp+220552_ code.launchpad. net,
Message:
Please take a look.
Description:
provider/azure: fix tests for go1.3/gccgo
Fix a test to use SameContents instead of DeepEquals.
Also, make StopInstances deterministic; it now stops
instances in the order of IDs specified. One of the
StopInstances tests was sending responses in the wrong
order, and that has been rectified.
Fixes lp:1303583
https:/ /code.launchpad .net/~axwalk/ juju-core/ lp1303583- provider- azure-tests- gccgo/+ merge/220552
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/93520047/
Affected files (+12, -6 lines): azure/environ. go azure/environ_ test.go
A [revision details]
M provider/
M provider/
Index: [revision details] 20140522020148- mkgjwj28zqzfxca d
=== 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: provider/ azure/environ. go azure/environ. go' azure/environ. go 2014-05-22 01:35:12 +0000 azure/environ. go 2014-05-22 03:48:17 +0000
=== modified file 'provider/
--- provider/
+++ provider/
@@ -769,15 +769,18 @@
// Map services to role names we want to delete. string] map[string] bool) ceId(id) tances[ serviceName] = nil serviceNames, serviceName) Names, ok := serviceInstance s[serviceName] eNames = make(map[ string] bool) stances[ serviceName] = deleteRoleNames serviceNames, serviceName) Names[roleName] = true s[serviceName] GetHostedServic eProperties( serviceName, true)
serviceInstances := make(map[
+ serviceNames := make([]string, 0)
for _, id := range ids {
serviceName, roleName := env.splitInstan
if roleName == "" {
serviceIns
+ serviceNames = append(
} else {
deleteRole
if !ok {
deleteRol
serviceIn
+ serviceNames = append(
}
deleteRole
}
@@ -788,7 +791,8 @@
//
// Note: concurrent operations on Affinity Groups have been
// found to cause conflict responses, so we do everything serially.
- for serviceName, deleteRoleNames := range serviceInstances {
+ for _, serviceName := range serviceNames {
+ deleteRoleNames := serviceInstance
service, err := context.
if err != nil {
return err
Index: provider/ azure/environ_ test.go azure/environ_ test.go' azure/environ_ test.go 2014-05-14 02:59:53 +0000 azure/environ_ test.go 2014-05-22 03:48:17 +0000 (service2, service2Role1Name)
=== modified file 'provider/
--- provider/
+++ provider/
@@ -828,8 +828,9 @@
inst2, err := env.getInstance
c.Assert(err, gc.IsNil)
- responses := buildGetService PropertiesRespo nses(c, service1, service2) PropertiesRespo nses(c, service1) cherResponse( nil, lict, nil)) gementAPIRespon ses(responses)
- // Failed to delete one of the services.
+ responses := buildGetService
+ // Failed to delete one of the services. This will cause StopInstances to
stop
+ // immediately.
responses = append(responses, gwacl.NewDispat
http.StatusConf
requests := gwacl.PatchMana
@@ -838,8 +839,7 @@
c.Check( len(*requests) , gc.Equals, len(responses)) uestMatches( c,
assertOneReq
*requests, "GET",...