cmd/juju/commands: not all tests are being run

Bug #1578456 reported by Andrew Wilkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Andrew Wilkins

Bug Description

I just ran the tests in the "cmd/juju/commands" package, and expected one to fail. It didn't. Tail of the output for that package:

    PASS: machine_test.go:35: MachineSuite.TestMachineAdd 0.014s
    PASS: machine_test.go:48: MachineSuite.TestMachineRemove 0.017s
    PASS: main_test.go:154: MainSuite.TestActualRunJujuArgOrder 0.323s
    PASS: main_test.go:621: MainSuite.TestAllCommandsPurposeDocCapitalization 0.000s
    ok github.com/juju/juju/cmd/juju/commands 52.096s

Spot the difference with the output from a different package:

    PASS: metricsdebug_test.go:134: DebugMetricsCommandSuite.TestServiceWithNoptionGreaterThanMetricCount 0.067s
    PASS: metricsdebug_test.go:166: DebugMetricsCommandSuite.TestUnitJsonOutput 0.050s
    PASS: metricsdebug_test.go:90: DebugMetricsCommandSuite.TestUnits 0.070s
    OK: 10 passed
    PASS
    ok github.com/juju/juju/cmd/juju/metricsdebug 1.036s

Something is most likely calling os.Exit(0).

Revision history for this message
Andrew Wilkins (axwalk) wrote :

Here's the culprit:

START: main_test.go:179: MainSuite.TestFirstRun2xFrom1x
START: <autogenerated>:872: MainSuite.SetUpTest
PASS: <autogenerated>:872: MainSuite.SetUpTest 0.000s

ok github.com/juju/juju/cmd/juju/commands 0.756s

Revision history for this message
Andrew Wilkins (axwalk) wrote :

Fixed by https://github.com/juju/juju/pull/5345

Nate also has a PR up for review (https://github.com/juju/juju/pull/5250) which addresses this, but also does other things that we may not want to force through CI right now.

Andrew Wilkins (axwalk)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta7 → none
milestone: none → 2.0-beta7
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.