python-tripleoclient unit test fails due to missing sudo

Bug #1834347 reported by Javier Peña
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Alex Schultz

Bug Description

After [1], unit tests are failing in the RDO Trunk RHEL 8 builder due to a missing sudo, see [2].

Digging in the latest change, it looks like the issue is called by the call to utils.ansible_symlink() in [3], which needs sudo, and is not mocked in the unit test.

[1] - https://review.opendev.org/656997
[2] - https://trunk.rdoproject.org/rhel8-master/ea/ce/eaced0d1c7a9eaa06d10e3afb0b548e961812a35_766a35e5/rpmbuild.log
[3] - https://opendev.org/openstack/python-tripleoclient/src/branch/master/tripleoclient/v1/minion_config.py#L331-L332

Changed in tripleo:
importance: Undecided → High
status: New → Triaged
milestone: none → train-2
assignee: nobody → Alex Schultz (alex-schultz)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

Fix proposed to branch: master
Review: https://review.opendev.org/667656

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

Reviewed: https://review.opendev.org/667656
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=831b1e7bbbf29c4e488d8650b60ac2ca329b2a3f
Submitter: Zuul
Branch: master

commit 831b1e7bbbf29c4e488d8650b60ac2ca329b2a3f
Author: Alex Schultz <email address hidden>
Date: Wed Jun 26 09:41:35 2019 -0600

    Fix minion config test

    We were missing a mock for the ansible symlink call so it was actually
    executing on the host. This fails in our package building environments
    because we do not have access to sudo.

    Change-Id: I6f2082c6880f313b841fc420bc362a52708b3358
    Closes-Bug: #1834347

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
Javier Peña (jpena-c) wrote :

I can confirm the patch fixed builds, thanks!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 12.1.0

This issue was fixed in the openstack/python-tripleoclient 12.1.0 release.

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.