@@ -61,30 +61,28 @@ if [[ "$TEST" == "plugin-from-pypi" ]]; then
6161 git checkout ${COMPONENT_VERSION} -- pulp_python/tests/
6262fi
6363
64+ echo " machine pulp
65+ login admin
66+ password password
67+ " | cmd_stdin_prefix bash -c " cat > /root/.netrc"
68+
69+ cat unittest_requirements.txt | cmd_stdin_prefix bash -c " cat > /tmp/unittest_requirements.txt"
70+ cat functest_requirements.txt | cmd_stdin_prefix bash -c " cat > /tmp/functest_requirements.txt"
71+ cmd_prefix pip3 install -r /tmp/unittest_requirements.txt
72+ cmd_prefix pip3 install -r /tmp/functest_requirements.txt
73+ cmd_prefix pip3 install --upgrade ../pulp-smash
74+
6475cd ../pulp-openapi-generator
76+ ./generate.sh pulp_python python
77+ cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_python-client
78+ sudo rm -rf ./pulp_python-client
6579./generate.sh pulpcore python
66- pip install ./pulpcore-client
67- rm -rf ./pulpcore-client
68- if [[ " $TEST " = ' bindings' ]]; then
69- ./generate.sh pulpcore ruby 0
70- cd pulpcore-client
71- gem build pulpcore_client.gemspec
72- gem install --both ./pulpcore_client-0.gem
73- fi
80+ cmd_prefix pip3 install /root/pulp-openapi-generator/pulpcore-client
81+ sudo rm -rf ./pulpcore-client
7482cd $REPO_ROOT
7583
76- if [[ " $TEST " = ' bindings' ]]; then
77- if [ -f $REPO_ROOT /.ci/assets/bindings/test_bindings.py ]; then
78- python $REPO_ROOT /.ci/assets/bindings/test_bindings.py
79- fi
80- if [ -f $REPO_ROOT /.ci/assets/bindings/test_bindings.rb ]; then
81- ruby $REPO_ROOT /.ci/assets/bindings/test_bindings.rb
82- fi
83- exit
84- fi
85-
86- cat unittest_requirements.txt | cmd_stdin_prefix bash -c " cat > /tmp/unittest_requirements.txt"
87- cmd_prefix pip3 install -r /tmp/unittest_requirements.txt
84+ CERTIFI=$( cmd_prefix python3 -c ' import certifi; print(certifi.where())' )
85+ cmd_prefix bash -c " cat /etc/pulp/certs/pulp_webserver.crt | tee -a " $CERTIFI " > /dev/null"
8886
8987# check for any uncommitted migrations
9088echo " Checking for uncommitted migrations..."
@@ -96,13 +94,11 @@ if [[ "$TEST" != "upgrade" ]]; then
9694fi
9795
9896# Run functional tests
99- export PYTHONPATH=$REPO_ROOT ${PYTHONPATH: +: ${PYTHONPATH} }
100-
10197if [[ " $TEST " == " performance" ]]; then
10298 if [[ -z ${PERFORMANCE_TEST+x} ]]; then
103- pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_python.tests.performance
99+ cmd_prefix bash -c " pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_python.tests.performance"
104100 else
105- pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_python.tests.performance.test_$PERFORMANCE_TEST
101+ cmd_prefix bash -c " pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_python.tests.performance.test_$PERFORMANCE_TEST "
106102 fi
107103 exit
108104fi
@@ -112,20 +108,20 @@ if [ -f $FUNC_TEST_SCRIPT ]; then
112108else
113109
114110 if [[ " $GITHUB_WORKFLOW " == " Python Nightly CI/CD" ]]; then
115- pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_python.tests.functional -m parallel -n 8
116- pytest -v -r sx --color=yes --pyargs pulp_python.tests.functional -m " not parallel"
111+ cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_python.tests.functional -m parallel -n 8 --nightly "
112+ cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs pulp_python.tests.functional -m ' not parallel' --nightly "
117113
118114
119- 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
120- pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m " from_pulpcore_for_all_plugins and not parallel"
115+ 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 "
116+ 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 "
121117
122118 else
123- pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_python.tests.functional -m " parallel and not nightly " -n 8
124- pytest -v -r sx --color=yes --pyargs pulp_python.tests.functional -m " not parallel and not nightly "
119+ cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_python.tests.functional -m parallel -n 8"
120+ cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs pulp_python.tests.functional -m ' not parallel' "
125121
126122
127- pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m " from_pulpcore_for_all_plugins and not nightly and parallel" -n 8
128- pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m " from_pulpcore_for_all_plugins and not nightly and not parallel"
123+ 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"
124+ 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' "
129125
130126 fi
131127
0 commit comments