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..20d16ecc062 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,8 +219,8 @@ 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() - assert 'Missing activation key!' in context.value.response.text + target_sat.api.RegistrationCommand().create() + assert 'Test' in context.value.response.text def test_negative_capsule_without_registration_enabled(