Packstack fails tox py27 unit tests only on RHEL

Bug #1694469 reported by Maciej Kucia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Packstack
Fix Released
Undecided
Unassigned

Bug Description

This bug was originally reported at:
https://bugzilla.redhat.com/show_bug.cgi?id=1383620

Description of problem:
Packstack unit tests are failing on RHEL-based machine or docker image.

Tested on
> uname -a
Linux test-node 3.10.0-327.28.3.el7.x86_64 #1 SMP Fri Aug 12 13:21:05 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
> uname -a
Linux docker-image 3.10.0-327.18.2.el7.x86_64 #1 SMP Fri Apr 8 05:09:53 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

Version-Release number of selected component (if applicable):
2b29648d20ef22aee6f67ad25fbe932137f30bfd (master)
98cc90f7226d415c4163ee644f9e609d4aa11fe5 (stable/mitaka)
5df800fa09ac5b44da334a08319919b59194f655 (stable/liberty)

How reproducible:
100%

Steps to Reproduce:
0. Running on RHEL 7.2
1. git clone https://review.rdoproject.org/r/openstack/packstack
2. cd packstack
3. tox -epy27

Actual results:
tox -epy27
GLOB sdist-make: /home/jenkins/jroot/workspace/ci-test-unit/workspace/openstack-packstack/setup.py
py27 create: /home/jenkins/jroot/workspace/ci-test-unit/workspace/openstack-packstack/.tox/py27
py27 installdeps: -r/home/jenkins/jroot/workspace/ci-test-unit/workspace/openstack-packstack/tools/pip-requires, -r/home/jenkins/jroot/workspace/ci-test-unit/workspace/openstack-packstack/tools/test-requires
py27 inst: /home/jenkins/jroot/workspace/ci-test-unit/workspace/openstack-packstack/.tox/dist/packstack-mitaka-rc2.zip
py27 installed: cffi==1.8.3,coverage==4.2,cryptography==1.5.2,docutils==0.12,enum34==1.1.6,flake8==2.1.0,hacking==0.9.6,idna==2.1,ipaddress==1.0.17,mccabe==0.2.1,netaddr==0.7.18,nose==1.3.7,packstack===mitaka-rc2,pbr==1.10.0,pep8==1.5.6,pyasn1==0.1.9,pycparser==2.14,pyflakes==0.8.1,pyOpenSSL==16.1.0,PyYAML==3.12,six==1.10.0
py27 runtests: PYTHONHASHSEED='2686720743'
py27 runtests: commands[0] | nosetests
...............................E
======================================================================
ERROR: Make sure RHN password is quoted.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/jroot/workspace/ci-test-unit/workspace/openstack-packstack/tests/test_plugin_prescript.py", line 34, in test_rhn_creds_quoted
    prescript_000.controller.CONF["CONFIG_KEYSTONE_HOST"] = "1.2.3.4"
AttributeError: 'module' object has no attribute 'controller'

----------------------------------------------------------------------
Ran 32 tests in 1.645s

FAILED (errors=1)
ERROR: InvocationError: '/home/jenkins/jroot/workspace/ci-test-unit/workspace/openstack-packstack/.tox/py27/bin/nosetests'
___________________________________ summary ____________________________________
ERROR: py27: commands failed

Expected results:
Unit Tests pass

Additional info:
The issue does not exist on Centos because the code is not executed:

cat tests/test_plugin_prescript.py

# On non-RHEL, the CONFIG_{RH,SATELLITE} options are never set,
# i.e. this test would always fail. Therefore, only run it on RHEL.
if not prescript_000.is_rhel():
    return

Tags: rhel unittest
Revision history for this message
Maciej Kucia (maciejkucia) wrote :

The problem is still present at revision c759a2502f7ae982c0c1b451ed5008a4231a8904

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

Reviewed: https://review.openstack.org/469166
Committed: https://git.openstack.org/cgit/openstack/packstack/commit/?id=97889b9da1cee4946fc530ca904e5689bc824422
Submitter: Jenkins
Branch: master

commit 97889b9da1cee4946fc530ca904e5689bc824422
Author: Maciej Kucia <email address hidden>
Date: Tue May 30 17:33:13 2017 +0200

    Removed test_plugin_prescript.py

    Packstack gerrit gating does not check unit tests on RHEL.
    Because of that the only test in `test_plugin_prescript.py`
    is not failing. The test name is `test_rhn_creds_quoted`.
    On non-RHEL systems test is simply skipped.

    Currently the test does not make any sense to exist, hence
    the removal.

    Fixes-Bug: #1694469
    Change-Id: I0e65cd76f5005edf0074cd378b2314298a0670db
    Signed-off-by: Maciej Kucia <email address hidden>

Changed in packstack:
status: New → 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.