utils/ssh: test failures

Bug #1298115 reported by Dave Cheney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Andrew Wilkins

Bug Description

Happens under gc and gccgo, the test is probably using a map to collect the set of options.

lucky(~/src/launchpad.net/juju-core) % go test ./utils/ssh/

----------------------------------------------------------------------
FAIL: ssh_test.go:94: SSHCommandSuite.TestCommandEnablePTY

[LOG] 0:00.000 DEBUG juju.utils.ssh running: ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -t -t "localhost" 'echo 123'
ssh_test.go:99:
    s.assertCommandArgs(c, s.commandOptions([]string{"echo", "123"}, &opts),
        s.fakessh+" -o StrictHostKeyChecking no -o PasswordAuthentication no -t -t localhost echo 123",
    )
ssh_test.go:57:
    c.Assert(strings.TrimSpace(string(out)), gc.Equals, expected)
... obtained string = "/tmp/gocheck-4751997750760398084/6/ssh -t -t -o StrictHostKeyChecking no -o PasswordAuthentication no localhost echo 123"
... expected string = "/tmp/gocheck-4751997750760398084/6/ssh -o StrictHostKeyChecking no -o PasswordAuthentication no -t -t localhost echo 123"

----------------------------------------------------------------------
FAIL: ssh_test.go:126: SSHCommandSuite.TestCopy

[LOG] 0:00.000 DEBUG juju.utils.ssh running: scp -o "StrictHostKeyChecking no" -i "x" -i "y" -P "2022" "/tmp/blah" "<email address hidden>:baz"
ssh_test.go:137:
    // EnablePTY has no effect for Copy
    c.Assert(string(out), gc.Equals, s.fakescp+" -o StrictHostKeyChecking no -i x -i y -P 2022 /tmp/blah <email address hidden>:baz\n")
... obtained string = "/tmp/gocheck-4751997750760398084/11/scp -i x -i y -P 2022 -o StrictHostKeyChecking no /tmp/blah <email address hidden>:baz\n"
... expected string = "/tmp/gocheck-4751997750760398084/11/scp -o StrictHostKeyChecking no -i x -i y -P 2022 /tmp/blah <email address hidden>:baz\n"

OOPS: 41 passed, 2 FAILED
--- FAIL: Test (10.32 seconds)
FAIL
FAIL launchpad.net/juju-core/utils/ssh 10.399s

Tags: ppc64el

Related branches

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

This was changed, I'm told, to ease debugging. I think I'll just put it back to using a slice with known order.

Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Andrew Wilkins (axwalk)
Curtis Hovey (sinzui)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
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.