unit tests: adapt check_config to gen-kdump-conf.sh

Now, kdump.conf is generated by gen-kdump-conf.sh, hence adapting
check_config to run that script firstly then check the generated file.

Signed-off-by: Pingfan Liu <piliu@redhat.com>
Reviewed-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
Pingfan Liu 2022-11-25 16:40:49 +08:00 committed by Coiby Xu
parent 787b041aab
commit 0414386cb8
1 changed files with 5 additions and 1 deletions

View File

@ -178,6 +178,7 @@ Describe 'kdumpctl'
bad_kdump_conf=$(mktemp -t bad_kdump_conf.XXXXXXXXXX)
cleanup() {
rm -f "$bad_kdump_conf"
rm -f kdump.conf
}
AfterAll 'cleanup'
@ -189,8 +190,11 @@ Describe 'kdumpctl'
The stderr should include 'Invalid kdump config option blabla'
End
Parameters:value aarch64 ppc64le s390x x86_64
It 'should be happy with the default kdump.conf'
# shellcheck disable=SC2034
./gen-kdump-conf.sh "$1" > kdump.conf
# shellcheck disable=SC2034
# override the KDUMP_CONFIG_FILE variable
KDUMP_CONFIG_FILE=./kdump.conf
When call parse_config