Merge lp:~allenap/gwacl/destroy-everything into lp:gwacl
Status: | Needs review |
---|---|
Proposed branch: | lp:~allenap/gwacl/destroy-everything |
Merge into: | lp:gwacl |
Diff against target: |
471 lines (+382/-11) 5 files modified
example/destroyer/run.go (+113/-0) management_base.go (+31/-0) management_base_test.go (+104/-0) xmlobjects.go (+36/-1) xmlobjects_test.go (+98/-10) |
To merge this branch: | bzr merge lp:~allenap/gwacl/destroy-everything |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email: mp+177420@code.launchpad.net |
Commit message
Script to destroy most things belonging to a subscription.
Description of the change
I wrote this because I had loads of artifacts in my Azure account that would take me a day to remove, which is more time than it has taken to implement this script and run it.
Along the way I had to implement ListDisks() and ListStorageAcco
Unmerged revisions
- 211. By Gavin Panella
-
Remove virtual networks too.
- 210. By Gavin Panella
-
Example script to destroy (almost) everything.
- 209. By Gavin Panella
-
Whitespace.
- 208. By Gavin Panella
-
New method ListDisks().
- 207. By Gavin Panella
-
New struct for Disks.
- 206. By Gavin Panella
-
New method, ListStorageAcco
unts. - 205. By Gavin Panella
-
Invalid StorageServices template for test.
This looks helpful — although please say very clearly at the top of the destroyer program what it does! Otherwise people might expect it to prompt for the thing they want to delete, or something.
The literal XML in tests leads to funny situations, like "true|false" as a Boolean field, but it works for me.
One thing I'm not a fan of is the happy-path-only tests with names like TestFunction. When you push yourself there's usually a corner case you can find that could gainfully be tested. It's a useful habit not just for improving test coverage, but for honing testability skills as well — it trains you to recognize unnecessarily complex code, code that's hard to test exhaustively, unnecessary special cases, and forgotten corner cases.