mock's return value for processutils.ssh_execute is incorrect

Bug #1273452 reported by Ruby Loo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Ruby Loo

Bug Description

In tests/drivers/test_ssh.py, SSHPrivateMethodsTestCase tests are mocking processutils.ssh_execute() and sets its return value to a list. However, processutils.ssh_execute() doesn't return a list, it returns a tuple: (stdout, stderr).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/69479

Changed in ironic:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/69479
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=5978ff38181191f9f844129772c07c865154443a
Submitter: Jenkins
Branch: master

commit 5978ff38181191f9f844129772c07c865154443a
Author: Ruby Loo <email address hidden>
Date: Mon Jan 27 21:49:40 2014 +0000

    mock's return value for processutils.ssh_execute

    In tests/drivers/test_ssh.py, SSHPrivateMethodsTestCase tests are mocking
    processutils.ssh_execute() and sets its return value to a list. However,
    processutils.ssh_execute() doesn't return a list, it returns a tuple: (stdout, stderr).

    This fixes the tests, by changing the return values to (stdout, stderr) tuples.

    Change-Id: If146d80ad9acd33bd5c676e6b2ba2142c9b07a84
    Closes-Bug: #1273452

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: icehouse-3 → 2014.1
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.