-
Notifications
You must be signed in to change notification settings - Fork 165
Auto-verify artifact packages against require/recommend #4726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
705219c
Add automatic artifact verification with dynamic phase injection
vaibhavdaren 002e049
address partial comments from code review
vaibhavdaren ffe2c85
address comments from code review happz
vaibhavdaren c5939c5
add tmt injected requirements for verification
vaibhavdaren b77928a
update text and distgits requires recommends
vaibhavdaren 2e6fb6e
change help text for the new feature
vaibhavdaren 5a69ab1
simplify tests for auto verify
vaibhavdaren 2683854
fix the repo_id to repo_file check
vaibhavdaren 2b1e6e9
stop autoverify plugin test for nvr priority cases
vaibhavdaren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| /plan: | ||
| summary: Plan for verify-installation injection tests | ||
| discover: | ||
| how: fmf | ||
| provision: | ||
| how: container | ||
| execute: | ||
| how: tmt | ||
|
|
||
| /test: | ||
| test: /bin/true | ||
| duration: 5m | ||
| summary: Verify verify-installation injection behaviour | ||
| require: | ||
| - make |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| summary: Test verify-installation injection | ||
| description: | | ||
| Test that the verify-installation phase is injected | ||
| when verify=true (default) and suppressed when verify=false. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| #!/bin/bash | ||
| . /usr/share/beakerlib/beakerlib.sh || exit 1 | ||
| . ../../../images.sh || exit 1 | ||
| . ../lib/common.sh || exit 1 | ||
|
|
||
| rlJournalStart | ||
| rlPhaseStartSetup | ||
| rlRun "PROVISION_HOW=${PROVISION_HOW:-container}" | ||
| rlRun "pushd data" | ||
| rlRun "run=\$(mktemp -d)" 0 "Create run directory" | ||
|
|
||
| setup_distro_environment | ||
|
|
||
| # Get koji build ID for make | ||
| get_koji_build_id "make" "$koji_tag" | ||
| rlPhaseEnd | ||
|
|
||
| rlPhaseStartTest "Test verify-installation phase injection (verify=true)" | ||
| rlRun -s "tmt run -i $run --scratch -vvv --all \ | ||
| plan --name /plan \ | ||
| provision -h $PROVISION_HOW --image $TEST_IMAGE_PREFIX/$image_name \ | ||
| prepare --how artifact --provide koji.build:${KOJI_BUILD_ID}" \ | ||
| 0 "Verify should pass with verify=true (default)" | ||
|
|
||
| rlAssertGrep "verify-artifact-packages" $rlRun_LOG | ||
| rlAssertGrep "pass verify-artifact-packages / make" $rlRun_LOG | ||
| rlAssertGrep "All packages verified successfully" $rlRun_LOG | ||
| rlPhaseEnd | ||
|
|
||
| rlPhaseStartTest "Test verify=false suppresses verify-installation phase" | ||
| rlRun -s "tmt run -i $run --scratch -vvv --all \ | ||
| plan --name /plan \ | ||
| provision -h $PROVISION_HOW --image $TEST_IMAGE_PREFIX/$image_name \ | ||
| prepare --how artifact --provide koji.build:${KOJI_BUILD_ID} --no-verify" \ | ||
| 0 "No-verify should succeed without verify phase" | ||
|
|
||
| rlAssertNotGrep "verify-artifact-packages" $rlRun_LOG | ||
| rlPhaseEnd | ||
|
|
||
| rlPhaseStartCleanup | ||
| rlRun "rm -rf $run" | ||
| rlRun "popd" | ||
| rlPhaseEnd | ||
| rlJournalEnd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
| test: /test | ||
| prepare: | ||
| - how: artifact | ||
| verify: false | ||
| provide: | ||
| - koji.build:KOJI_BUILD_ID | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,5 +21,8 @@ properties: | |
| default-repository-priority: | ||
| type: integer | ||
|
|
||
| verify: | ||
| type: boolean | ||
|
|
||
| required: | ||
| - how | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.