Merge lp:~axwalk/juju-core/1.16 into lp:juju-core/1.16
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Andrew Wilkins | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 1963 | ||||
Proposed branch: | lp:~axwalk/juju-core/1.16 | ||||
Merge into: | lp:juju-core/1.16 | ||||
Diff against target: |
231 lines (+67/-24) 3 files modified
cmd/juju/bootstrap_test.go (+48/-16) cmd/juju/cmd_test.go (+15/-5) environs/sync/sync.go (+4/-3) |
||||
To merge this branch: | bzr merge lp:~axwalk/juju-core/1.16 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+190085@code.launchpad.net |
Commit message
Fix upload-tools for released versions; fix tests
(Cherry picked from juju-core to juju-core/1.16)
There was an issue with sync.Upload/
release versions. Upload sets Dev to true in SyncContext,
and calls SyncTools. SyncTools then sets Dev to false
because MinorVersion==-1. This caused SyncTools to fail,
since uploaded tools are *always* dev (version.Build++).
Also, several bootstrap and upgrade-juju tests have been
fixed for running in release versions (tested with
version.
Finally, some test cleanup (don't connect commands
to stdio in tests):
- Added nullContext helper
- Make runCommand panic if ctx is nil
- Replace runCommand(nil...) with runCommand(
Fixes #1237123
Description of the change
Fix upload-tools for released versions; fix tests
(Cherry picked from juju-core to juju-core/1.16)
There was an issue with sync.Upload/
release versions. Upload sets Dev to true in SyncContext,
and calls SyncTools. SyncTools then sets Dev to false
because MinorVersion==-1. This caused SyncTools to fail,
since uploaded tools are *always* dev (version.Build++).
Also, several bootstrap and upgrade-juju tests have been
fixed for running in release versions (tested with
version.
Finally, some test cleanup (don't connect commands
to stdio in tests):
- Added nullContext helper
- Make runCommand panic if ctx is nil
- Replace runCommand(nil...) with runCommand(
Fixes #1237123
Reviewers: mp+190085_ code.launchpad. net,
Message:
Please take a look.
Description:
Fix upload-tools for released versions; fix tests
(Cherry picked from juju-core to juju-core/1.16)
There was an issue with sync.Upload/ SyncTools for
release versions. Upload sets Dev to true in SyncContext,
and calls SyncTools. SyncTools then sets Dev to false
because MinorVersion==-1. This caused SyncTools to fail,
since uploaded tools are *always* dev (version.Build++).
Also, several bootstrap and upgrade-juju tests have been version= ="1.16. 0").
fixed for running in release versions (tested with
version.
Finally, some test cleanup (don't connect commands nullContext( )...)
to stdio in tests):
- Added nullContext helper
- Make runCommand panic if ctx is nil
- Replace runCommand(nil...) with runCommand(
Fixes #1237123
https:/ /code.launchpad .net/~axwalk/ juju-core/ 1.16/+merge/ 190085
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/14579044/
Affected files (+69, -24 lines): bootstrap_ test.go cmd_test. go sync/sync. go
A [revision details]
M cmd/juju/
M cmd/juju/
M environs/
Index: [revision details] 20131009063247- dtp5u8dlhoevxio 4
=== 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: cmd/juju/ bootstrap_ test.go bootstrap_ test.go' bootstrap_ test.go 2013-10-03 01:56:15 +0000 bootstrap_ test.go 2013-10-09 10:33:58 +0000 wRetry []bool
=== modified file 'cmd/juju/
--- cmd/juju/
+++ cmd/juju/
@@ -65,12 +65,30 @@
args []string
expectedAllo
err string
+ // If version != "", version.Current will be
+ // set to it for the duration of the test.
+ version string
+ // If addVersionToSource is true, then "version"
+ // above will be populated in the tools source.
+ addVersionToSource bool
}
var bootstrapRetryTests = []bootstrapRetr yTest{{ precise- amd64", precise- amd64", precise- amd64", // dev version to force upload
- info: "no tools uploaded, first check has no retries; check
after upload has retries",
- expectedAllowRetry: []bool{false, true},
- err: "tools not found",
+ info: "no tools uploaded, first check has no retries; no
matching binary in source; sync fails with no second attempt",
+ expectedAllowRetry: []bool{false},
+ err: "no matching tools available",
+ version: "1.16.0-
+}, {
+ info: "no tools uploaded, first check has no retries;
matching binary in source; check after sync has retries",
+ expectedAllowRetry: []bool{false, true},
+ err: "tools not found",
+ version: "1.16.0-
+ addVersionToSource: true,
+}, {
+ info: "no tools uploaded, first check has no retries; no
matching binary in source; check after upload has retries",
+ expectedAllowRetry: []bool{false, true},
+ err: "tools not found",
+ version: "1.15.1-
}, {
info: "new tools uploaded, so we want to allow retries to
give them a cha...