diff --git a/.ci/ansible/start_container.yaml b/.ci/ansible/start_container.yaml index b19a2054f..47e5221e5 100644 --- a/.ci/ansible/start_container.yaml +++ b/.ci/ansible/start_container.yaml @@ -83,22 +83,14 @@ command: "docker logs pulp" failed_when: true - - block: - - name: "Check version of component being tested" - assert: - that: - - (result.json.versions | items2dict(key_name="component", value_name="version"))[component_name] | canonical_semver == (component_version | canonical_semver) - fail_msg: | - Component {{ component_name }} was expected to be installed in version {{ component_version }}. - Instead it is reported as version {{ (result.json.versions | items2dict(key_name="component", value_name="version"))[component_name] }}. - rescue: - - name: "Check version of component being tested (legacy)" - assert: - that: - - (result.json.versions | items2dict(key_name="component", value_name="version"))[legacy_component_name] | canonical_semver == (component_version | canonical_semver) - fail_msg: | - Component {{ legacy_component_name }} was expected to be installed in version {{ component_version }}. - Instead it is reported as version {{ (result.json.versions | items2dict(key_name="component", value_name="version"))[legacy_component_name] }}. + - name: "Check version of component being tested" + assert: + that: + - (result.json.versions | items2dict(key_name="component", value_name="version"))[item.app_label] | canonical_semver == (component_version | canonical_semver) + fail_msg: | + Component {{ item.app_label }} was expected to be installed in version {{ component_version }}. + Instead it is reported as version {{ (result.json.versions | items2dict(key_name="component", value_name="version"))[item.app_label] }}. + loop: "{{ 'plugins' | ansible.builtin.extract(lookup('ansible.builtin.file', '../../template_config.yml') | from_yaml) }}" - name: "Set pulp password in .netrc" copy: diff --git a/.github/template_gitref b/.github/template_gitref index e456a48e1..8b7135e44 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-316-g69ef1f6 +2021.08.26-320-g4fd782b diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b4aa9a273..c5c53b7aa 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -31,7 +31,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/create-branch.yml b/.github/workflows/create-branch.yml index da6074c9a..2dedc3b4a 100644 --- a/.github/workflows/create-branch.yml +++ b/.github/workflows/create-branch.yml @@ -72,7 +72,7 @@ jobs: find CHANGES -type f -regex ".*\.\(bugfix\|doc\|feature\|misc\|deprecation\|removal\)" -exec git rm {} + - name: Checkout plugin template - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: pulp/plugin_template path: plugin_template @@ -85,7 +85,7 @@ jobs: git add -A - name: Make a PR with version bump and without CHANGES/* - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v6 with: path: pulp_container token: ${{ secrets.RELEASE_TOKEN }} diff --git a/.github/workflows/kanban.yml b/.github/workflows/kanban.yml index a0dc687c2..bc2356d38 100644 --- a/.github/workflows/kanban.yml +++ b/.github/workflows/kanban.yml @@ -61,7 +61,7 @@ jobs: linked-issues: ${{ steps.linked-issues.outputs.issues }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get Linked Issues Action uses: kin/gh-action-get-linked-issues@v1.0 id: linked-issues diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 82c068e82..28dc5c192 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -57,7 +57,7 @@ jobs: run: python .ci/scripts/collect_changes.py - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.RELEASE_TOKEN }} title: "Update Changelog" diff --git a/.github/workflows/scripts/install.sh b/.github/workflows/scripts/install.sh index 27c328024..7ad24dd26 100755 --- a/.github/workflows/scripts/install.sh +++ b/.github/workflows/scripts/install.sh @@ -16,7 +16,7 @@ set -euv source .github/workflows/scripts/utils.sh PLUGIN_VERSION="$(sed -n -e 's/^\s*current_version\s*=\s*//p' .bumpversion.cfg | python -c 'from packaging.version import Version; print(Version(input()))')" -PLUGIN_NAME="./pulp_container/dist/pulp_container-${PLUGIN_VERSION}-py3-none-any.whl" +PLUGIN_SOURCE="./pulp_container/dist/pulp_container-${PLUGIN_VERSION}-py3-none-any.whl" export PULP_API_ROOT="/pulp/" @@ -37,7 +37,6 @@ then fi cd .ci/ansible/ -PLUGIN_SOURCE="${PLUGIN_NAME}" if [ "$TEST" = "s3" ]; then PLUGIN_SOURCE="${PLUGIN_SOURCE} pulpcore[s3]" fi @@ -128,7 +127,7 @@ if [ "${PULP_API_ROOT:-}" ]; then sed -i -e '$a api_root: "'"$PULP_API_ROOT"'"' vars/main.yaml fi -pulp config create --base-url https://pulp --api-root "$PULP_API_ROOT" +pulp config create --base-url https://pulp --api-root "$PULP_API_ROOT" --username "admin" --password "password" if [[ "$TEST" != "docs" ]]; then cp ~/.config/pulp/cli.toml "${REPO_ROOT}/../pulp-cli/tests/cli.toml" fi diff --git a/.github/workflows/scripts/script.sh b/.github/workflows/scripts/script.sh index a945ea88f..272d8f5f4 100755 --- a/.github/workflows/scripts/script.sh +++ b/.github/workflows/scripts/script.sh @@ -130,7 +130,6 @@ cmd_user_prefix bash -c "django-admin makemigrations container --check --dry-run # Run unit tests. cmd_user_prefix bash -c "PULP_DATABASES__default__USER=postgres pytest -v -r sx --color=yes --suppress-no-test-exit-code -p no:pulpcore --pyargs pulp_container.tests.unit" - # Run functional tests if [[ "$TEST" == "performance" ]]; then if [[ -z ${PERFORMANCE_TEST+x} ]]; then @@ -155,7 +154,7 @@ else fi pushd ../pulp-cli pip install -r test_requirements.txt -pytest -v -m pulp_container +pytest -v -m "pulp_container" popd if [ -f "$POST_SCRIPT" ]; then diff --git a/.github/workflows/update-labels.yml b/.github/workflows/update-labels.yml index 2afc8915c..5a0d759cf 100644 --- a/.github/workflows/update-labels.yml +++ b/.github/workflows/update-labels.yml @@ -31,7 +31,7 @@ jobs: echo ::group::PYDEPS pip install requests pyyaml echo ::endgroup:: - - uses: "actions/checkout@v3" + - uses: "actions/checkout@v4" - name: "Update labels" run: | python3 .github/workflows/scripts/update_backport_labels.py diff --git a/.github/workflows/update_ci.yml b/.github/workflows/update_ci.yml index 890322066..e40468b9f 100644 --- a/.github/workflows/update_ci.yml +++ b/.github/workflows/update_ci.yml @@ -55,7 +55,7 @@ jobs: ../plugin_template/scripts/update_ci.sh - name: "Create Pull Request for CI files" - uses: "peter-evans/create-pull-request@v4" + uses: "peter-evans/create-pull-request@v6" with: token: "${{ secrets.RELEASE_TOKEN }}" path: "pulp_container" diff --git a/pulp_container/tests/functional/api/test_rbac_repo_content.py b/pulp_container/tests/functional/api/test_rbac_repo_content.py index 305b4b0c3..2c18ee89e 100644 --- a/pulp_container/tests/functional/api/test_rbac_repo_content.py +++ b/pulp_container/tests/functional/api/test_rbac_repo_content.py @@ -40,6 +40,8 @@ def setUpClass(cls): api_client = gen_container_client() cfg = config.get_config() + delete_orphans() + cls.repository_api = RepositoriesContainerApi(api_client) cls.pushrepository_api = RepositoriesContainerPushApi(api_client) cls.tags_api = ContentTagsApi(api_client) diff --git a/template_config.yml b/template_config.yml index f66052db4..f7d959ae9 100644 --- a/template_config.yml +++ b/template_config.yml @@ -1,7 +1,7 @@ # This config represents the latest values used when running the plugin-template. Any settings that # were not present before running plugin-template have been added with their default values. -# generated with plugin_template@2021.08.26-316-g69ef1f6 +# generated with plugin_template@2021.08.26-320-g4fd782b api_root: /pulp/ black: true @@ -61,7 +61,6 @@ pulp_settings: pulp_settings_azure: null pulp_settings_gcp: null pulp_settings_s3: null -pulpprojectdotorg_key_id: aa499d7938ed pydocstyle: true release_email: pulp-infra@redhat.com release_user: pulpbot