Skip to content

Commit

Permalink
Use environment variable to set db username for unit test runs
Browse files Browse the repository at this point in the history
  • Loading branch information
dkliban committed Oct 8, 2019
1 parent 8533bc9 commit 7d64b11
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions templates/travis/.travis/script.sh.j2
Expand Up @@ -89,8 +89,7 @@ export CMD_STDIN_PREFIX="sudo kubectl exec -i $PULP_API_POD --"
#alias pytest="$CMD_PREFIX pytest"

# Run unit tests.
$CMD_PREFIX bash -c "sed \"s/'USER': 'pulp'/'USER': 'postgres'/g\" /etc/pulp/settings.py > unit-test.py"
$CMD_PREFIX bash -c "PULP_SETTINGS=/unit-test.py django-admin test --noinput /usr/local/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/{{ plugin_snake }}/tests/unit/"
$CMD_PREFIX bash -c "PULP_DATABASES__default__USER=postgres django-admin test --noinput /usr/local/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/{{ plugin_snake }}/tests/unit/"

# Note: This function is in the process of being merged into after_failure
show_logs_and_return_non_zero() {
Expand Down

0 comments on commit 7d64b11

Please sign in to comment.