tests: Update tests
Add tests. Resolves: bz2094575 Signed-off-by: Prarit Bhargava <prarit@redhat.com>
This commit is contained in:
parent
a98de8af00
commit
6cf2567318
3
tests/.gitignore
vendored
Normal file
3
tests/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
artifacts/
|
||||
*.patch
|
||||
*.diff
|
||||
12
tests/run_tests.sh
Executable file
12
tests/run_tests.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# fail the whole test set if any of the command pipelines fail
|
||||
set -ex
|
||||
|
||||
# when running this in 1minutetip the PATH must be specified to execute
|
||||
# in the local directory.
|
||||
echo "Setting path to local directory"
|
||||
PATH=$PATH:$(pwd)
|
||||
|
||||
# simple version test
|
||||
version.sh
|
||||
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: . # switch to subfolder. This parameter is REQUIRED, use `dir: .` for current folder
|
||||
run: ./run_tests.sh # this is your test command, its exit code is the outcome of the test
|
||||
15
tests/version.sh
Executable file
15
tests/version.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This is a simple version test to satisfy the RHEL8.1 onboard gating
|
||||
# requirement.
|
||||
|
||||
# fail the whole test if any of the command pipelines below fails
|
||||
set -ex
|
||||
|
||||
version=$(mcelog --version 2>&1 | awk ' { print $2 } ')
|
||||
if [ "$version" == "unknown" ]; then
|
||||
echo "mcelog version is unknown."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# if we get here, it's OK
|
||||
Loading…
Reference in New Issue
Block a user