Merge lp:~rvb/gwacl/fix-destroydeploy into lp:gwacl
Proposed by
Raphaël Badin
Status: | Rejected |
---|---|
Rejected by: | Raphaël Badin |
Proposed branch: | lp:~rvb/gwacl/fix-destroydeploy |
Merge into: | lp:gwacl |
Diff against target: |
84 lines (+17/-21) 3 files modified
example/management/run.go (+4/-18) management.go (+8/-3) management_test.go (+5/-0) |
To merge this branch: | bzr merge lp:~rvb/gwacl/fix-destroydeploy |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella | Approve | ||
Review via email: mp+173034@code.launchpad.net |
Commit message
Do not check the error we get from stopping the VM inside DestroyDeployment.
To post a comment you must log in.
Looks good.
[1]
- if err != nil && !IsNotFoundErro r(err) { r(err) {
- return err
- }
+ // Even when the operation itself works (i.e. the VM is stopped) we
+ // seem to alway get a 500 error back.
+ // We chose to ignore the error.
+ // If the operation errors for real and the VM is still running then
+ // the next operation (deleting the disks) will fail.
+ // if err != nil && !IsNotFoundErro
+ // return err
+ // }
I suggest only ignoring 500 errors. A new IsInternalServe rError( )
helper would be good here.
[2]
+/* ployment) TestFailsShutti ngDownRole( c *C) { ponse Check(record, HasLen, 2)
+// This test is currently disabled as we chose to ignore the errors returned
+// when shutting down the VM. See the comment in DestroyDeployment's code
+// for more information.
func (suite *suiteDestroyDe
var responses []DispatcherRes
// Prepare.
@@ -377,6 +381,7 @@
c.Check(err, ErrorMatches, "POST request failed [(]500: Internal Server Error[)]")
c.
}
+*/
You can use c.ExpectFailure (reason string) here; see godoc.org/ launchpad. net/gocheck# C.ExpectFailure.
http://