6464echo " machine pulp
6565login admin
6666password password
67- " | cmd_stdin_prefix bash -c " cat > /root/.netrc"
68- cmd_stdin_prefix bash -c " chmod og-rw /root/.netrc"
67+ " | cmd_user_stdin_prefix bash -c " cat >> ~pulp/.netrc"
68+ # Some commands like ansible-galaxy specifically require 600
69+ cmd_user_stdin_prefix bash -c " chmod 600 ~pulp/.netrc"
6970
7071cat unittest_requirements.txt | cmd_stdin_prefix bash -c " cat > /tmp/unittest_requirements.txt"
7172cat functest_requirements.txt | cmd_stdin_prefix bash -c " cat > /tmp/functest_requirements.txt"
@@ -90,17 +91,17 @@ cmd_prefix bash -c "cat /etc/pulp/certs/pulp_webserver.crt | tee -a "$CERTIFI"
9091
9192# check for any uncommitted migrations
9293echo " Checking for uncommitted migrations..."
93- cmd_prefix bash -c " django-admin makemigrations --check --dry-run"
94+ cmd_user_prefix bash -c " django-admin makemigrations --check --dry-run"
9495
9596# Run unit tests.
96- cmd_prefix bash -c " PULP_DATABASES__default__USER=postgres pytest -v -r sx --color=yes -p no:pulpcore --pyargs pulp_file.tests.unit"
97+ cmd_user_prefix bash -c " PULP_DATABASES__default__USER=postgres pytest -v -r sx --color=yes -p no:pulpcore --pyargs pulp_file.tests.unit"
9798
9899# Run functional tests
99100if [[ " $TEST " == " performance" ]]; then
100101 if [[ -z ${PERFORMANCE_TEST+x} ]]; then
101- cmd_prefix bash -c " pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance"
102+ cmd_user_prefix bash -c " pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance"
102103 else
103- cmd_prefix bash -c " pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST "
104+ cmd_user_prefix bash -c " pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST "
104105 fi
105106 exit
106107fi
@@ -110,20 +111,20 @@ if [ -f $FUNC_TEST_SCRIPT ]; then
110111else
111112
112113 if [[ " $GITHUB_WORKFLOW " == " File Nightly CI/CD" ]] || [[ " ${RELEASE_WORKFLOW:- false} " == " true" ]]; then
113- cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8 --nightly"
114- cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel' --nightly"
114+ cmd_user_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8 --nightly"
115+ cmd_user_prefix bash -c " pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel' --nightly"
115116
116117
117- cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and parallel' -n 8 --nightly"
118- cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and not parallel' --nightly"
118+ cmd_user_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and parallel' -n 8 --nightly"
119+ cmd_user_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and not parallel' --nightly"
119120
120121 else
121- cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8"
122- cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel'"
122+ cmd_user_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8"
123+ cmd_user_prefix bash -c " pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel'"
123124
124125
125- cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and parallel' -n 8"
126- cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and not parallel'"
126+ cmd_user_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and parallel' -n 8"
127+ cmd_user_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and not parallel'"
127128
128129 fi
129130
0 commit comments