Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add initial Redfish unit tests #398

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ matrix:
python: "2.7"
dist: trusty # trusty required for 2.7
install:
- bash ./kill_python3_tests.sh
- pip install -U pip setuptools
- pip install -Ur requirements-test.txt --upgrade-strategy eager
script: py.test tests/ -v --cov wrapanapi
Expand Down
16 changes: 16 additions & 0 deletions kill_python3_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

BLACKLISTED_TEST_FILES=test_redfish.py

PYTHON_VERSION=$(python -c 'import sys ; print("%d%d"%sys.version_info[0:2])')

echo "Python at version $PYTHON_VERSION"
if (( "$PYTHON_VERSION" < "36" ))
then
echo "Blacklisting files that require at least Python 3.6"
for F in $BLACKLISTED_TEST_FILES
do
echo "tests/$F"
[[ -f "tests/$F" ]] && mv "tests/$F" "tests/$F.disable"
done
fi
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ python-novaclient==7.1.2
python-heatclient
pyvcloud==19.1.2
py3winrm==0.0.1
redfish-client==0.1.0
redfish-client==0.2.1
requests
six
tzlocal
Expand Down
Loading