Skip to content

Commit 04f625b

Browse files
committed
[noissue]
Required PR: pulp/pulp-smash#1297
1 parent 0a87515 commit 04f625b

File tree

7 files changed

+49
-42
lines changed

7 files changed

+49
-42
lines changed

.ci/ansible/smash-config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
],
77
"selinux enabled": false,
88
"version": "3",
9-
"aiohttp_fixtures_origin": "172.18.0.1"
9+
"aiohttp_fixtures_origin": "127.0.0.1"
1010
},
1111
"hosts": [
1212
{
@@ -26,7 +26,7 @@
2626
"pulp workers": {},
2727
"redis": {},
2828
"shell": {
29-
"transport": "docker"
29+
"transport": "local"
3030
}
3131
}
3232
}

.github/template_gitref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021.08.26-130-ge87b661
1+
2021.08.26-130-gf6574f2-dirty

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ jobs:
195195
GITHUB_REPO_SLUG: ${{ github.repository }}
196196
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
197197
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
198-
198+
- name: Setup tmate session
199+
if: always()
200+
uses: mxschmitt/action-tmate@v3
199201
- name: Extract Deprecations from Logs
200202
id: deprecations
201203
run: echo "::set-output name=deprecations-${{ matrix.env.TEST }}::$(docker logs pulp 2>&1 | grep -i pulpcore.deprecation | base64 -w 0)"

.github/workflows/scripts/func_test_script.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
set -mveuo pipefail
55

6-
pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m "parallel and not nightly" -n 8
7-
pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m "not parallel and not nightly"
6+
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m 'parallel and not nightly' -n 8"
7+
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel and not nightly'"
88

99
if [ "${GITHUB_REF##refs/tags/}" != "${GITHUB_REF}" ]
1010
then
@@ -16,11 +16,9 @@ then
1616
if [ ${PULPCORE_VERSION::3} == "3.9" ]
1717
then
1818
# Temporarily need to downgrade pulp-smash to run pulpcore 3.9 tests
19-
pip install 'pulp-smash==1!0.12.0'
19+
cmd_prefix bash -c "pip install 'pulp-smash==1!0.12.0'"
2020
fi
2121
fi
2222

23-
pip install -r ../pulpcore/functest_requirements.txt
24-
25-
pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m "parallel and not nightly" -n 8
26-
pytest -v -r sx --color=yes --pyargs pulpcore.tests.functional -m "not parallel and not nightly"
23+
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'parallel and not nightly' -n 8"
24+
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulpcore.tests.functional -m 'not parallel and not nightly'"

.github/workflows/scripts/install.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ if [[ "$TEST" = "docs" || "$TEST" = "publish" ]]; then
2222
pip install -r doc_requirements.txt
2323
fi
2424

25-
pip install -e ../pulpcore -e ../pulp-certguard
26-
pip install -r functest_requirements.txt
27-
2825
cd .ci/ansible/
2926

3027
TAG=ci_build
@@ -68,6 +65,8 @@ plugins:
6865
source: $PULP_CERTGUARD
6966
- name: pulpcore
7067
source: ./pulpcore
68+
- name: pulp-smash
69+
source: ./pulp-smash
7170
VARSYAML
7271
fi
7372

@@ -78,6 +77,8 @@ services:
7877
volumes:
7978
- ./settings:/etc/pulp
8079
- ./ssh:/keys/
80+
- ~/.config:/root/.config
81+
- ../../../pulp-openapi-generator:/root/pulp-openapi-generator
8182
VARSYAML
8283

8384
cat >> vars/main.yaml << VARSYAML

.github/workflows/scripts/script.sh

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,33 @@ if [[ "$TEST" == "plugin-from-pypi" ]]; then
6161
git checkout ${COMPONENT_VERSION} -- pulp_file/tests/
6262
fi
6363

64+
cat unittest_requirements.txt | cmd_stdin_prefix bash -c "cat > /tmp/unittest_requirements.txt"
65+
cat functest_requirements.txt | cmd_stdin_prefix bash -c "cat > /tmp/functest_requirements.txt"
66+
cmd_prefix pip3 install -r /tmp/unittest_requirements.txt
67+
cmd_prefix pip3 install -r /tmp/functest_requirements.txt
68+
cmd_prefix pip3 install --upgrade ../pulp-smash
69+
6470
cd ../pulp-openapi-generator
71+
./generate.sh pulp_file python
72+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_file-client
73+
sudo rm -rf ./pulp_file-client
6574
./generate.sh pulpcore python
66-
pip install ./pulpcore-client
67-
rm -rf ./pulpcore-client
75+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulpcore-client
76+
sudo rm -rf ./pulpcore-client
6877
if [[ "$TEST" = 'bindings' ]]; then
6978
./generate.sh pulpcore ruby 0
7079
cd pulpcore-client
7180
gem build pulpcore_client.gemspec
72-
gem install --both ./pulpcore_client-0.gem
81+
cmd_prefix gem install --both /root/pulp-openapi-generator/pulpcore-client/pulpcore_client-0.gem
7382
fi
7483
./generate.sh pulp_certguard python
75-
pip install ./pulp_certguard-client
76-
rm -rf ./pulp_certguard-client
84+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_certguard-client
85+
sudo rm -rf ./pulp_certguard-client
7786
if [[ "$TEST" = 'bindings' ]]; then
7887
./generate.sh pulp-certguard ruby 0
7988
cd pulp-certguard-client
8089
gem build pulp-certguard_client.gemspec
81-
gem install --both ./pulp-certguard_client-0.gem
90+
cmd_prefix gem install --both /root/pulp-openapi-generator/pulp-certguard-client/pulp-certguard_client-0.gem
8291
cd ..
8392
fi
8493
cd $REPO_ROOT
@@ -93,8 +102,8 @@ if [[ "$TEST" = 'bindings' ]]; then
93102
exit
94103
fi
95104

96-
cat unittest_requirements.txt | cmd_stdin_prefix bash -c "cat > /tmp/unittest_requirements.txt"
97-
cmd_prefix pip3 install -r /tmp/unittest_requirements.txt
105+
CERTIFI=$(cmd_prefix python3 -c 'import certifi; print(certifi.where())')
106+
cmd_prefix bash -c "cat /etc/pulp/certs/pulp_webserver.crt | tee -a "$CERTIFI" > /dev/null"
98107

99108
# check for any uncommitted migrations
100109
echo "Checking for uncommitted migrations..."
@@ -106,16 +115,13 @@ if [[ "$TEST" != "upgrade" ]]; then
106115
fi
107116

108117
# Run functional tests
109-
export PYTHONPATH=$REPO_ROOT/../pulp-certguard${PYTHONPATH:+:${PYTHONPATH}}
110-
export PYTHONPATH=$REPO_ROOT${PYTHONPATH:+:${PYTHONPATH}}
111-
112118

113119
if [[ "$TEST" == "upgrade" ]]; then
114120
# Handle app label change:
115121
sed -i "/require_pulp_plugins(/d" pulp_file/tests/functional/utils.py
116122

117123
# Running pre upgrade tests:
118-
pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.pre
124+
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.pre"
119125

120126
# Checking out ci_upgrade_test branch and upgrading plugins
121127
cmd_prefix bash -c "cd pulpcore; git checkout -f ci_upgrade_test; pip install --upgrade --force-reinstall ."
@@ -157,25 +163,25 @@ if [[ "$TEST" == "upgrade" ]]; then
157163
# Rebuilding bindings
158164
cd ../pulp-openapi-generator
159165
./generate.sh pulpcore python
160-
pip install ./pulpcore-client
166+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulpcore-client
161167
./generate.sh pulp_file python
162-
pip install ./pulp_file-client
168+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_file-client
163169
./generate.sh pulp_certguard python
164-
pip install ./pulp_certguard-client
170+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_certguard-client
165171
cd $REPO_ROOT
166172

167173
# Running post upgrade tests
168174
git checkout ci_upgrade_test -- pulp_file/tests/
169-
pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post
175+
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post"
170176
exit
171177
fi
172178

173179

174180
if [[ "$TEST" == "performance" ]]; then
175181
if [[ -z ${PERFORMANCE_TEST+x} ]]; then
176-
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance
182+
cmd_prefix bash -c "pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance"
177183
else
178-
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST
184+
cmd_prefix bash -c "pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST"
179185
fi
180186
exit
181187
fi
@@ -185,20 +191,20 @@ if [ -f $FUNC_TEST_SCRIPT ]; then
185191
else
186192

187193
if [[ "$GITHUB_WORKFLOW" == "File Nightly CI/CD" ]]; then
188-
pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8
189-
pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m "not parallel"
194+
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8"
195+
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel'"
190196

191197

192-
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
193-
pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m "from_pulpcore_for_all_plugins and not parallel"
198+
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"
199+
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'"
194200

195201
else
196-
pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m "parallel and not nightly" -n 8
197-
pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m "not parallel and not nightly"
202+
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m 'parallel and not nightly' -n 8"
203+
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel and not nightly'"
198204

199205

200-
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
201-
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"
206+
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 nightly and parallel' -n 8"
207+
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 nightly and not parallel'"
202208

203209
fi
204210

template_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# This config represents the latest values used when running the plugin-template. Any settings that
22
# were not present before running plugin-template have been added with their default values.
33

4-
# generated with plugin_template@2021.08.26-129-gf780fda
4+
# generated with plugin_template@2021.08.26-129-gf780fda-dirty
55

66
additional_repos:
77
- branch: main
88
name: pulp-certguard
9-
aiohttp_fixtures_origin: 172.18.0.1
9+
aiohttp_fixtures_origin: 127.0.0.1
1010
api_root: /pulp/
1111
black: true
1212
check_commit_message: true

0 commit comments

Comments
 (0)