From 6b96dd4293fd592da4e6ea0fbafdd204712d1109 Mon Sep 17 00:00:00 2001 From: shwsingh Date: Wed, 10 Apr 2024 11:53:19 +0530 Subject: [PATCH] Update PRT Label --- .github/workflows/prt_labels.yml | 6 +++--- tests/foreman/api/test_registration.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/prt_labels.yml b/.github/workflows/prt_labels.yml index 52dd68589b3..20a93fe05d2 100644 --- a/.github/workflows/prt_labels.yml +++ b/.github/workflows/prt_labels.yml @@ -8,7 +8,7 @@ jobs: prt_labels_remover: name: remove the PRT label when amendments or new commits added to PR runs-on: ubuntu-latest - if: "(contains(github.event.pull_request.labels.*.name, 'PRT-Passed') || contains(github.event.pull_request.labels.*.name, 'PRT-Failed'))" + if: "(contains(github.event.pull_request.labels.*.name, 'PRT-Passed')" steps: - name: Avoid the race condition as PRT result will be cleaned run: | @@ -23,7 +23,7 @@ jobs: wait-interval: 2 count: 5 - - name: remove the PRT Passed/Failed label, for new commit + - name: remove the PRT Passed label, for new commit if: always() && ${{steps.prt.outputs.result}} == 'not_found' uses: actions/github-script@v7 with: @@ -35,7 +35,7 @@ jobs: repo: context.repo.repo, issue_number: prNumber, }); - const labelsToRemove = ['PRT-Failed', 'PRT-Passed']; + const labelsToRemove = ['PRT-Passed']; const labelsToRemoveFiltered = labelsToRemove.filter(label => issue.data.labels.some(({ name }) => name === label)); if (labelsToRemoveFiltered.length > 0) { await Promise.all(labelsToRemoveFiltered.map(async label => { diff --git a/tests/foreman/api/test_registration.py b/tests/foreman/api/test_registration.py index 04b23933309..4edf8564322 100644 --- a/tests/foreman/api/test_registration.py +++ b/tests/foreman/api/test_registration.py @@ -211,7 +211,7 @@ def test_positive_rex_interface_for_global_registration( @pytest.mark.tier1 -def test_negative_global_registration_without_ak(module_target_sat): +def test_negative_global_registration_without_ak(target_sat): """Attempt to register a host without ActivationKey :id: e48a6260-97e0-4234-a69c-77bbbcde85de @@ -219,7 +219,7 @@ def test_negative_global_registration_without_ak(module_target_sat): :expectedresults: Generate command is disabled without ActivationKey """ with pytest.raises(HTTPError) as context: - module_target_sat.api.RegistrationCommand().create() + target_sat.api.RegistrationCommand().create() assert 'Missing activation key!' in context.value.response.text