Skip to content

Commit

Permalink
Update PRT Label
Browse files Browse the repository at this point in the history
  • Loading branch information
shweta83 committed Apr 10, 2024
1 parent ce6777c commit cfb89ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/prt_labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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:
Expand All @@ -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 => {
Expand Down
6 changes: 3 additions & 3 deletions tests/foreman/api/test_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,16 @@ 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
: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(
Expand Down

0 comments on commit cfb89ff

Please sign in to comment.