Isolation failure in several tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
John Weldon |
Bug Description
There are a handful of tests that fail on my machine because of leaking of my environment to the tests
For example the initial one reported is:
When running the environs/sshstorage tests
If the developers environment has `set -o noclobber`
Then the storageSuite.
storage_
c.Assert(err, gc.IsNil)
... value *os.PathError = &os.PathError{
This is because SSHStorage.Put uses "cat > $TMPFILE", which errors if $TMPFILE exists.
One solution is to change SSHStorage.Put to use "cat >| $TMPFILE", which forces an overwrite if $TMPFILE exists, however this really masks another issue which is that the test is vulnerable to the vagaries of the users environment.
Other examples, all related to improper isolation of test environment, are:
FAIL: run_test.go:124: RunTestSuite.
run_test.go:130:
c.Assert(err, gc.IsNil)
... value *errors.errorString = &errors.
FAIL: run_test.go:134: RunTestSuite.
[LOG] 0:00.000 INFO juju.utils.fslock attempted lock failed "uniter-
run_test.go:150:
c.Assert(err, gc.IsNil)
... value *errors.errorString = &errors.
FAIL: kvm_test.go:248: KVMSuite.
kvm_test.go:260:
c.Assert(err, gc.ErrorMatches, "exit status 127")
... error string = "" +
... "/usr/share/
... ": exit status 127"
... regex string = "exit status 127"
FAIL: storage_
[LOG] 0:00.000 DEBUG juju.utils.ssh running: ssh -o "StrictHostKeyC
[LOG] 0:00.153 DEBUG juju.utils.ssh running: ssh -o "StrictHostKeyC
[LOG] 0:00.340 DEBUG juju.environs.
storage_
c.Assert(err, gc.IsNil)
... value *os.PathError = &os.PathError{
FAIL: mongo_test.go:146: MongoSuite.
[LOG] 0:00.000 INFO juju.mongo Ensuring mongo server is running; data directory /tmp/gocheck-
[LOG] 0:00.000 INFO juju.mongo installing juju-mongodb
[LOG] 0:00.000 INFO juju.utils.apt Running: [apt-get --option=
[LOG] 0:00.031 DEBUG juju.mongo using mongod: /tmp/gocheck-
mongo_test.go:188:
c.Assert(tlog, gc.Matches, start+`using mongod: .*/mongod --version: "db version v2\.4\.9`+tail)
... value string = "" +
... "[LOG] 0:00.000 INFO juju.mongo Ensuring mongo server is running; data directory /tmp/gocheck-
... "[LOG] 0:00.000 INFO juju.mongo installing juju-mongodb\n" +
... "[LOG] 0:00.000 INFO juju.utils.apt Running: [apt-get --option=
... "[LOG] 0:00.031 DEBUG juju.mongo using mongod: /tmp/gocheck-
... regex string = "^(.|\\n)*using mongod: .*/mongod --version: \"db version v2\\.4\
Changed in juju-core: | |
assignee: | nobody → John Weldon (johnweldon4) |
Changed in juju-core: | |
status: | New → In Progress |
description: | updated |
summary: |
- Isolation failure in sshstorage test + Isolation failure in several tests |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
importance: | Undecided → High |
milestone: | none → 1.21-alpha1 |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |