-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Vector Li <[email protected]>
- Loading branch information
Vector Li
committed
Jun 13, 2023
1 parent
f4995d8
commit 7a16e89
Showing
4 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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,9 @@ | ||
/pos: | ||
summary: Normal test metadata should be accepted | ||
test: 'false' | ||
framework: shell | ||
|
||
/neg: | ||
summary: Malformed test metadata should be rejected | ||
test: false | ||
framework: shell |
This file contains 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 @@ | ||
summary: Verify test metadata should be string |
This file contains 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,23 @@ | ||
#!/bin/bash | ||
. /usr/share/beakerlib/beakerlib.sh || exit 1 | ||
|
||
rlJournalStart | ||
rlPhaseStartSetup | ||
rlRun "pushd data" | ||
rlRun "set -o pipefail" | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Normal test metadata" | ||
rlRun -s "tmt tests ls /pos" 0 | ||
rlAssertGrep "/tests/foo/pos" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Malformed test metadata" | ||
rlRun -s "tmt tests ls /neg" "1-255" | ||
rlAssertGrep "Field '/tests/foo/neg:test' must be a string, 'bool' found" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartCleanup | ||
rlRun "popd" | ||
rlPhaseEnd | ||
rlJournalEnd |