Skip to content

Commit 25e7c64

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

File tree

7 files changed

+48
-42
lines changed

7 files changed

+48
-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: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,30 @@ 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
6571
./generate.sh pulpcore python
66-
pip install ./pulpcore-client
67-
rm -rf ./pulpcore-client
72+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulpcore-client
73+
sudo rm -rf ./pulpcore-client
6874
if [[ "$TEST" = 'bindings' ]]; then
6975
./generate.sh pulpcore ruby 0
7076
cd pulpcore-client
7177
gem build pulpcore_client.gemspec
72-
gem install --both ./pulpcore_client-0.gem
78+
cmd_prefix gem install --both /root/pulp-openapi-generator/pulpcore-client/pulpcore_client-0.gem
7379
fi
7480
./generate.sh pulp_certguard python
75-
pip install ./pulp_certguard-client
76-
rm -rf ./pulp_certguard-client
81+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_certguard-client
82+
sudo rm -rf ./pulp_certguard-client
7783
if [[ "$TEST" = 'bindings' ]]; then
7884
./generate.sh pulp-certguard ruby 0
7985
cd pulp-certguard-client
8086
gem build pulp-certguard_client.gemspec
81-
gem install --both ./pulp-certguard_client-0.gem
87+
cmd_prefix gem install --both /root/pulp-openapi-generator/pulp-certguard-client/pulp-certguard_client-0.gem
8288
cd ..
8389
fi
8490
cd $REPO_ROOT
@@ -93,8 +99,10 @@ if [[ "$TEST" = 'bindings' ]]; then
9399
exit
94100
fi
95101

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
102+
CERTIFI=$(cmd_prefix python3 -c 'import certifi; print(certifi.where())')
103+
cmd_prefix bash -c "cat /etc/pulp/certs/pulp_webserver.crt | tee -a "$CERTIFI" > /dev/null"
104+
105+
# Build and install bindings
98106

99107
# check for any uncommitted migrations
100108
echo "Checking for uncommitted migrations..."
@@ -106,16 +114,13 @@ if [[ "$TEST" != "upgrade" ]]; then
106114
fi
107115

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

113118
if [[ "$TEST" == "upgrade" ]]; then
114119
# Handle app label change:
115120
sed -i "/require_pulp_plugins(/d" pulp_file/tests/functional/utils.py
116121

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

120125
# Checking out ci_upgrade_test branch and upgrading plugins
121126
cmd_prefix bash -c "cd pulpcore; git checkout -f ci_upgrade_test; pip install --upgrade --force-reinstall ."
@@ -157,25 +162,25 @@ if [[ "$TEST" == "upgrade" ]]; then
157162
# Rebuilding bindings
158163
cd ../pulp-openapi-generator
159164
./generate.sh pulpcore python
160-
pip install ./pulpcore-client
165+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulpcore-client
161166
./generate.sh pulp_file python
162-
pip install ./pulp_file-client
167+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_file-client
163168
./generate.sh pulp_certguard python
164-
pip install ./pulp_certguard-client
169+
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_certguard-client
165170
cd $REPO_ROOT
166171

167172
# Running post upgrade tests
168173
git checkout ci_upgrade_test -- pulp_file/tests/
169-
pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post
174+
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post"
170175
exit
171176
fi
172177

173178

174179
if [[ "$TEST" == "performance" ]]; then
175180
if [[ -z ${PERFORMANCE_TEST+x} ]]; then
176-
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance
181+
cmd_prefix bash -c "pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance"
177182
else
178-
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST
183+
cmd_prefix bash -c "pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST"
179184
fi
180185
exit
181186
fi
@@ -185,20 +190,20 @@ if [ -f $FUNC_TEST_SCRIPT ]; then
185190
else
186191

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

191196

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"
197+
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"
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 not parallel'"
194199

195200
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"
201+
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"
202+
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel and not nightly'"
198203

199204

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"
205+
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"
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 not parallel'"
202207

203208
fi
204209

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)