Merge lp:~axwalk/juju-core/bootstrap-test-tools 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: 2640
Proposed branch: lp:~axwalk/juju-core/bootstrap-test-tools
Merge into: lp:~go-bot/juju-core/trunk
Diff against target: 77 lines (+25/-15)
1 file modified
cmd/juju/bootstrap_test.go (+25/-15)
To merge this branch: bzr merge lp:~axwalk/juju-core/bootstrap-test-tools
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+216237@code.launchpad.net

Commit message

cmd/juju: fix test expecting trusty tools

The tests were recently changed to use the
latest LTS release, however the fake tools
list wasn't updated to match. One of the
tests was failing on my Trusty machine; this
fixes it.

https://codereview.appspot.com/88730043/

Description of the change

cmd/juju: fix test expecting trusty tools

The tests were recently changed to use the
latest LTS release, however the fake tools
list wasn't updated to match. One of the
tests was failing on my Trusty machine; this
fixes it.

https://codereview.appspot.com/88730043/

To post a comment you must log in.
Revision history for this message
Andrew Wilkins (axwalk) wrote :

Reviewers: mp+216237_code.launchpad.net,

Message:
Please take a look.

Description:
cmd/juju: fix test expecting trusty tools

The tests were recently changed to use the
latest LTS release, however the fake tools
list wasn't updated to match. One of the
tests was failing on my Trusty machine; this
fixes it.

https://code.launchpad.net/~axwalk/juju-core/bootstrap-test-tools/+merge/216237

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/88730043/

Affected files (+17, -4 lines):
   A [revision details]
   M cmd/juju/bootstrap_test.go

Index: [revision details]
=== 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-20140416141527-e0lie6a18wlup1kx
+New revision: <email address hidden>

Index: cmd/juju/bootstrap_test.go
=== modified file 'cmd/juju/bootstrap_test.go'
--- cmd/juju/bootstrap_test.go 2014-04-11 11:28:04 +0000
+++ cmd/juju/bootstrap_test.go 2014-04-17 01:47:57 +0000
@@ -663,6 +663,8 @@
   v120p64 = version.MustParseBinary("1.2.0-precise-amd64")
   v120q32 = version.MustParseBinary("1.2.0-quantal-i386")
   v120q64 = version.MustParseBinary("1.2.0-quantal-amd64")
+ v120t32 = version.MustParseBinary("1.2.0-trusty-i386")
+ v120t64 = version.MustParseBinary("1.2.0-trusty-amd64")
   v190p32 = version.MustParseBinary("1.9.0-precise-i386")
   v190q64 = version.MustParseBinary("1.9.0-quantal-amd64")
   v200p64 = version.MustParseBinary("2.0.0-precise-amd64")
@@ -670,12 +672,21 @@
    v100d64, v100p64, v100q64, v100q32,
   }
   v120All = []version.Binary{
- v120d64, v120p64, v120q64, v120q32,
+ v120d64, v120p64, v120q64, v120q32, v120t32, v120t64,
   }
- vAll = []version.Binary{
- v100d64, v100p64, v100q32, v100q64,
- v120d64, v120p64, v120q32, v120q64,
+ v190All = []version.Binary{
    v190p32, v190q64,
+ }
+ v200All = []version.Binary{
    v200p64,
   }
+ vAll = joinBinaryVersions(v100All, v120All, v190All, v200All)
  )
+
+func joinBinaryVersions(versions ...[]version.Binary) []version.Binary {
+ var all []version.Binary
+ for _, versions := range versions {
+ all = append(all, versions...)
+ }
+ return all
+}

Revision history for this message
Tim Penhey (thumper) wrote :

LGTM

although we really should get better at isolating this.

https://codereview.appspot.com/88730043/

Revision history for this message
Dave Cheney (dave-cheney) wrote :

LGTM. Although it smells like version.Current was leaking in there
somewhere if upgrading the host caused tests to fail.

On Thu, Apr 17, 2014 at 11:57 AM, Tim Penhey <email address hidden> wrote:
> LGTM
>
> although we really should get better at isolating this.
>
> https://codereview.appspot.com/88730043/
>
> --
> https://code.launchpad.net/~axwalk/juju-core/bootstrap-test-tools/+merge/216237
> You are subscribed to branch lp:juju-core.

Revision history for this message
Go Bot (go-bot) wrote :
Download full text (26.3 KiB)

The attempt to merge lp:~axwalk/juju-core/bootstrap-test-tools into lp:juju-core failed. Below is the output from the failed tests.

ok launchpad.net/juju-core 0.014s
ok launchpad.net/juju-core/agent 1.725s
ok launchpad.net/juju-core/agent/mongo 1.331s
ok launchpad.net/juju-core/agent/tools 0.190s
ok launchpad.net/juju-core/bzr 5.272s
ok launchpad.net/juju-core/cert 2.372s
ok launchpad.net/juju-core/charm 0.432s
? launchpad.net/juju-core/charm/hooks [no test files]
? launchpad.net/juju-core/charm/testing [no test files]
ok launchpad.net/juju-core/cloudinit 0.028s
ok launchpad.net/juju-core/cloudinit/sshinit 0.800s
ok launchpad.net/juju-core/cmd 0.165s
ok launchpad.net/juju-core/cmd/charm-admin 0.709s
? launchpad.net/juju-core/cmd/charmd [no test files]
? launchpad.net/juju-core/cmd/charmload [no test files]
ok launchpad.net/juju-core/cmd/envcmd 0.169s

----------------------------------------------------------------------
FAIL: bootstrap_test.go:525: BootstrapSuite.TestAutoUploadAfterFailedSync

[LOG] 0:00.003 DEBUG juju.environs.tools no architecture specified when finding tools, looking for any
[LOG] 0:00.003 DEBUG juju.environs.tools no series specified when finding tools, looking for any
[LOG] 0:00.003 DEBUG juju.environs.simplestreams fetchData failed for "file:///tmp/jctest.F6e/gocheck-7504504064263669287/13/tools/streams/v1/index.sjson": stat /tmp/jctest.F6e/gocheck-7504504064263669287/13/tools/streams/v1/index.sjson: no such file or directory
[LOG] 0:00.003 DEBUG juju.environs.simplestreams cannot load index "file:///tmp/jctest.F6e/gocheck-7504504064263669287/13/tools/streams/v1/index.sjson": invalid URL "file:///tmp/jctest.F6e/gocheck-7504504064263669287/13/tools/streams/v1/index.sjson" not found
[LOG] 0:00.003 DEBUG juju.environs.simplestreams fetchData failed for "file:///tmp/jctest.F6e/gocheck-7504504064263669287/13/tools/streams/v1/index.json": stat /tmp/jctest.F6e/gocheck-7504504064263669287/13/tools/streams/v1/index.json: no such file or directory
[LOG] 0:00.003 DEBUG juju.environs.simplestreams cannot load index "file:///tmp/jctest.F6e/gocheck-7504504064263669287/13/tools/streams/v1/index.json": invalid URL "file:///tmp/jctest.F6e/gocheck-7504504064263669287/13/tools/streams/v1/index.json" not found
[LOG] 0:00.005 INFO juju.environs.tools Writing tools/streams/v1/index.json
[LOG] 0:00.005 INFO juju.environs.tools Writing tools/streams/v1/com.ubuntu.juju:released:tools.json
[LOG] 0:00.006 DEBUG juju.environs.tools no architecture specified when finding tools, looking for any
[LOG] 0:00.006 DEBUG juju.environs.tools no series specified when finding tools, looking for any
[LOG] 0:00.006 DEBUG juju.environs.simplestreams fetchData failed for "file:///tmp/jctest.F6e/gocheck-7504504064263669287/14/tools/streams/v1/index.sjson": stat /tmp/jctest.F6e/gocheck-7504504064263669287/14/tools/streams/v1/index.sjson: no such file or directory
[LOG] 0:00.006 DEBUG juju.environs.simplestreams cannot load index "file:///tmp/jctest.F6e/gocheck-7504504064263669287/14/tools/streams/v1/index.sjson": invalid URL "file:///tmp/jctest.F6e/gocheck-7504504064263669287/14/tools/streams/v1/index.sjson" not found
[LOG] 0:...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'cmd/juju/bootstrap_test.go'
--- cmd/juju/bootstrap_test.go 2014-04-11 11:28:04 +0000
+++ cmd/juju/bootstrap_test.go 2014-04-17 03:04:05 +0000
@@ -523,10 +523,9 @@
523}523}
524524
525func (s *BootstrapSuite) TestAutoUploadAfterFailedSync(c *gc.C) {525func (s *BootstrapSuite) TestAutoUploadAfterFailedSync(c *gc.C) {
526 otherSeries := "precise"526 s.PatchValue(&version.Current.Series, config.LatestLtsSeries())
527 if otherSeries == version.Current.Series {527 otherSeries := "quantal"
528 otherSeries = "raring"528
529 }
530 env := s.setupAutoUploadTest(c, "1.7.3", otherSeries)529 env := s.setupAutoUploadTest(c, "1.7.3", otherSeries)
531 // Run command and check for that upload has been run for tools matching the current juju version.530 // Run command and check for that upload has been run for tools matching the current juju version.
532 opc, errc := runCommand(nullContext(c), new(BootstrapCommand))531 opc, errc := runCommand(nullContext(c), new(BootstrapCommand))
@@ -536,17 +535,17 @@
536 c.Assert(err, gc.IsNil)535 c.Assert(err, gc.IsNil)
537 c.Logf("found: " + list.String())536 c.Logf("found: " + list.String())
538 urls := list.URLs()537 urls := list.URLs()
539 expectedUrlCount := 2
540538
541 // There will be distinct tools for each of these if they are different539 // We expect:
542 if config.LatestLtsSeries() != coretesting.FakeDefaultSeries {540 // latest LTS,
543 expectedUrlCount++541 // the specified series (quantal),
544 }542 // and the environment's default series (raring).
545 c.Assert(urls, gc.HasLen, expectedUrlCount)
546 expectedVers := []version.Binary{543 expectedVers := []version.Binary{
547 version.MustParseBinary(fmt.Sprintf("1.7.3.1-%s-%s", otherSeries, version.Current.Arch)),544 version.MustParseBinary(fmt.Sprintf("1.7.3.1-%s-%s", "quantal", version.Current.Arch)),
545 version.MustParseBinary(fmt.Sprintf("1.7.3.1-%s-%s", "raring", version.Current.Arch)),
548 version.MustParseBinary(fmt.Sprintf("1.7.3.1-%s-%s", version.Current.Series, version.Current.Arch)),546 version.MustParseBinary(fmt.Sprintf("1.7.3.1-%s-%s", version.Current.Series, version.Current.Arch)),
549 }547 }
548 c.Assert(urls, gc.HasLen, len(expectedVers))
550 for _, vers := range expectedVers {549 for _, vers := range expectedVers {
551 c.Logf("seeking: " + vers.String())550 c.Logf("seeking: " + vers.String())
552 _, found := urls[vers]551 _, found := urls[vers]
@@ -663,6 +662,8 @@
663 v120p64 = version.MustParseBinary("1.2.0-precise-amd64")662 v120p64 = version.MustParseBinary("1.2.0-precise-amd64")
664 v120q32 = version.MustParseBinary("1.2.0-quantal-i386")663 v120q32 = version.MustParseBinary("1.2.0-quantal-i386")
665 v120q64 = version.MustParseBinary("1.2.0-quantal-amd64")664 v120q64 = version.MustParseBinary("1.2.0-quantal-amd64")
665 v120t32 = version.MustParseBinary("1.2.0-trusty-i386")
666 v120t64 = version.MustParseBinary("1.2.0-trusty-amd64")
666 v190p32 = version.MustParseBinary("1.9.0-precise-i386")667 v190p32 = version.MustParseBinary("1.9.0-precise-i386")
667 v190q64 = version.MustParseBinary("1.9.0-quantal-amd64")668 v190q64 = version.MustParseBinary("1.9.0-quantal-amd64")
668 v200p64 = version.MustParseBinary("2.0.0-precise-amd64")669 v200p64 = version.MustParseBinary("2.0.0-precise-amd64")
@@ -670,12 +671,21 @@
670 v100d64, v100p64, v100q64, v100q32,671 v100d64, v100p64, v100q64, v100q32,
671 }672 }
672 v120All = []version.Binary{673 v120All = []version.Binary{
673 v120d64, v120p64, v120q64, v120q32,674 v120d64, v120p64, v120q64, v120q32, v120t32, v120t64,
674 }675 }
675 vAll = []version.Binary{676 v190All = []version.Binary{
676 v100d64, v100p64, v100q32, v100q64,
677 v120d64, v120p64, v120q32, v120q64,
678 v190p32, v190q64,677 v190p32, v190q64,
678 }
679 v200All = []version.Binary{
679 v200p64,680 v200p64,
680 }681 }
682 vAll = joinBinaryVersions(v100All, v120All, v190All, v200All)
681)683)
684
685func joinBinaryVersions(versions ...[]version.Binary) []version.Binary {
686 var all []version.Binary
687 for _, versions := range versions {
688 all = append(all, versions...)
689 }
690 return all
691}

Subscribers

People subscribed via source and target branches

to status/vote changes: