Merge lp:~wallyworld/juju-core/fix-fake-tools-trusty-2 into lp:juju-core/1.18
Proposed by
Ian Booth
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Ian Booth | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 2292 | ||||
Proposed branch: | lp:~wallyworld/juju-core/fix-fake-tools-trusty-2 | ||||
Merge into: | lp:juju-core/1.18 | ||||
Diff against target: |
53 lines (+9/-9) 2 files modified
environs/bootstrap/synctools.go (+3/-2) environs/testing/tools.go (+6/-7) |
||||
To merge this branch: | bzr merge lp:~wallyworld/juju-core/fix-fake-tools-trusty-2 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+219273@code.launchpad.net |
Commit message
Another attempt to fix tools tests
A first attempt to ensure the required fake
tools were uploaded for tests failed.
This rework uses a cleaner approach - the
ToolsLtsSeries slice from environs/bootstrap
is used to determine what tools to upload.
Description of the change
Another attempt to fix tools tests
A first attempt to ensure the required fake
tools were uploaded for tests failed.
This rework uses a cleaner approach - the
ToolsLtsSeries slice from environs/bootstrap
is used to determine what tools to upload.
To post a comment you must log in.
Reviewers: mp+219273_ code.launchpad. net,
Message:
Please take a look.
Description:
Another attempt to fix tools tests
A first attempt to ensure the required fake
tools were uploaded for tests failed.
This rework uses a cleaner approach - the
ToolsLtsSeries slice from environs/bootstrap
is used to determine what tools to upload.
https:/ /code.launchpad .net/~wallyworl d/juju- core/fix- fake-tools- trusty- 2/+merge/ 219273
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/97160044/
Affected files (+11, -9 lines): bootstrap/ synctools. go testing/ tools.go
A [revision details]
M environs/
M environs/
Index: [revision details] 20140512035456- e3volksqn5lj2pb 0
=== 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: environs/ bootstrap/ synctools. go bootstrap/ synctools. go' bootstrap/ synctools. go 2014-05-12 02:21:07 +0000 bootstrap/ synctools. go 2014-05-12 23:15:28 +0000
=== modified file 'environs/
--- environs/
+++ environs/
@@ -94,7 +94,8 @@
// Unless otherwise specified, we will upload tools for all lts series on
bootstrap
// when --upload-tools is used.
-var toolsLtsSeries = []string{"precise", "trusty"}
+// ToolsLtsSeries records the known lts series.
+var ToolsLtsSeries = []string{"precise", "trusty"}
// SeriesToUpload returns the supplied series with duplicates removed if series. ..) Add(version. Current. Series) Add(toolsSeries ) es(); ok {
// non-empty; otherwise it returns a default list of series we should
@@ -103,7 +104,7 @@
unique := set.NewStrings(
if unique.IsEmpty() {
unique.
- for _, toolsSeries := range toolsLtsSeries {
+ for _, toolsSeries := range ToolsLtsSeries {
unique.
}
if series, ok := cfg.DefaultSeri
Index: environs/ testing/ tools.go testing/ tools.go' testing/ tools.go 2014-05-12 03:31:03 +0000 testing/ tools.go 2014-05-12 23:15:28 +0000
=== modified file 'environs/
--- environs/
+++ environs/
@@ -13,7 +13,7 @@
agenttools "launchpad. net/juju- core/agent/ tools" net/juju- core/environs" net/juju- core/environs/ config" net/juju- core/environs/ bootstrap" net/juju- core/environs/ simplestreams" net/juju- core/environs/ storage" net/juju- core/environs/ tools"
"launchpad.
- "launchpad.
+ "launchpad.
"launchpad.
"launchpad.
envtools "launchpad.
@@ -161,12 +161,11 @@
}
func uploadFakeTools (stor storage.Storage) error { Binary{ version. Current} LatestLtsSeries () ToolsLtsSeries { Versions( stor, versions...); err != nil {
- versions := []version.
- toolsVersion := version.Current
- latestLts := config.
- if toolsVersion.Series != latestLts {
- toolsVersion.Series = latestLts
- versions = append(versions, toolsVersion)
+ var versions []version.Binary
+ for _, series := range bootstrap.
+ vers := version.Current
+ vers.Series = series
+ versions = append(versions, vers)
}
if _, err := UploadFakeTools
return err