Skip to content

Commit d0c074c

Browse files
committed
[noissue]
Required PR: pulp/pulp-smash#1297
1 parent 21dfc42 commit d0c074c

File tree

7 files changed

+43
-40
lines changed

7 files changed

+43
-40
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": "pulp"
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-129-gf780fda
1+
2021.08.26-129-gf780fda-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
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: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,22 @@ fi
6363

6464
cd ../pulp-openapi-generator
6565
./generate.sh pulpcore python
66-
pip install ./pulpcore-client
67-
rm -rf ./pulpcore-client
66+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulpcore-client
67+
sudo rm -rf ./pulpcore-client
6868
if [[ "$TEST" = 'bindings' ]]; then
6969
./generate.sh pulpcore ruby 0
7070
cd pulpcore-client
7171
gem build pulpcore_client.gemspec
72-
gem install --both ./pulpcore_client-0.gem
72+
cmd_prefix gem install --both /root/pulp-openapi-generator/pulpcore-client/pulpcore_client-0.gem
7373
fi
7474
./generate.sh pulp_certguard python
75-
pip install ./pulp_certguard-client
76-
rm -rf ./pulp_certguard-client
75+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_certguard-client
76+
sudo rm -rf ./pulp_certguard-client
7777
if [[ "$TEST" = 'bindings' ]]; then
7878
./generate.sh pulp-certguard ruby 0
7979
cd pulp-certguard-client
8080
gem build pulp-certguard_client.gemspec
81-
gem install --both ./pulp-certguard_client-0.gem
81+
cmd_prefix gem install --both /root/pulp-openapi-generator/pulp-certguard-client/pulp-certguard_client-0.gem
8282
cd ..
8383
fi
8484
cd $REPO_ROOT
@@ -93,8 +93,13 @@ if [[ "$TEST" = 'bindings' ]]; then
9393
exit
9494
fi
9595

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

99104
# check for any uncommitted migrations
100105
echo "Checking for uncommitted migrations..."
@@ -106,16 +111,13 @@ if [[ "$TEST" != "upgrade" ]]; then
106111
fi
107112

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

113115
if [[ "$TEST" == "upgrade" ]]; then
114116
# Handle app label change:
115117
sed -i "/require_pulp_plugins(/d" pulp_file/tests/functional/utils.py
116118

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

120122
# Checking out ci_upgrade_test branch and upgrading plugins
121123
cmd_prefix bash -c "cd pulpcore; git checkout -f ci_upgrade_test; pip install --upgrade --force-reinstall ."
@@ -157,25 +159,25 @@ if [[ "$TEST" == "upgrade" ]]; then
157159
# Rebuilding bindings
158160
cd ../pulp-openapi-generator
159161
./generate.sh pulpcore python
160-
pip install ./pulpcore-client
162+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulpcore-client
161163
./generate.sh pulp_file python
162-
pip install ./pulp_file-client
164+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_file-client
163165
./generate.sh pulp_certguard python
164-
pip install ./pulp_certguard-client
166+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_certguard-client
165167
cd $REPO_ROOT
166168

167169
# Running post upgrade tests
168170
git checkout ci_upgrade_test -- pulp_file/tests/
169-
pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post
171+
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post"
170172
exit
171173
fi
172174

173175

174176
if [[ "$TEST" == "performance" ]]; then
175177
if [[ -z ${PERFORMANCE_TEST+x} ]]; then
176-
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance
178+
cmd_prefix bash -c "pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance"
177179
else
178-
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST
180+
cmd_prefix bash -c "pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST"
179181
fi
180182
exit
181183
fi
@@ -185,20 +187,20 @@ if [ -f $FUNC_TEST_SCRIPT ]; then
185187
else
186188

187189
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"
190+
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8"
191+
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel'"
190192

191193

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"
194+
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"
195+
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'"
194196

195197
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"
198+
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"
199+
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel and not nightly'"
198200

199201

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"
202+
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"
203+
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'"
202204

203205
fi
204206

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: pulp
1010
api_root: /pulp/
1111
black: true
1212
check_commit_message: true

0 commit comments

Comments
 (0)