add gating test
This commit is contained in:
parent
49c1689a28
commit
b711d77eb7
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-10
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
50
tests/run_tests.sh
Executable file
50
tests/run_tests.sh
Executable file
@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
function ntimes
|
||||
{
|
||||
I=0
|
||||
for((I=0;I<50;I++))
|
||||
do
|
||||
"$@"
|
||||
done
|
||||
}
|
||||
|
||||
function fail
|
||||
{
|
||||
echo "FAIL: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# check output is always different
|
||||
if [ -n "$(uuid -n 50 | uniq --repeated)" ]
|
||||
then
|
||||
fail "dulicated output"
|
||||
fi
|
||||
|
||||
# check it can parse uuid it generated
|
||||
if ! uuid -d $(uuid -v1) >/dev/null 2>&1
|
||||
then
|
||||
fail "can't decore uuid"
|
||||
fi
|
||||
|
||||
# check v3 uses same output for same seed
|
||||
if ! [ "$({ uuid -n 5 -v3 ns:URL https://fedoraproject.org/; uuid -n 5 -v3 ns:URL https://fedoraproject.org/ ; } | wc -l)" = 10 ]
|
||||
then
|
||||
fail "v3 should have same output for same seed"
|
||||
fi
|
||||
|
||||
# check v5 uses same output for same seed
|
||||
if ! [ "$({ uuid -n 5 -v3 ns:URL https://fedoraproject.org/; uuid -n 5 -v3 ns:URL https://fedoraproject.org/ ; } | wc -l)" = 10 ]
|
||||
then
|
||||
fail "v5 should have same output for same seed"
|
||||
fi
|
||||
|
||||
# check v3 and v5 use different hashes (output)
|
||||
if ! [ "$({ uuid -n 5 -v3 ns:URL https://fedoraproject.org/; uuid -n 5 -v5 ns:URL https://fedoraproject.org/ ; } | uniq | wc -l)" = 2 ]
|
||||
then
|
||||
fail "v3 and v5 uuid shouldn't be the same"
|
||||
fi
|
||||
|
||||
echo "SUCCESS"
|
||||
exit 0
|
||||
9
tests/tests.yml
Normal file
9
tests/tests.yml
Normal file
@ -0,0 +1,9 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- simple:
|
||||
dir: .
|
||||
run: run_tests.sh
|
||||
Loading…
Reference in New Issue
Block a user