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:
parent
787b041aab
commit
0414386cb8
@ -178,6 +178,7 @@ Describe 'kdumpctl'
|
|||||||
bad_kdump_conf=$(mktemp -t bad_kdump_conf.XXXXXXXXXX)
|
bad_kdump_conf=$(mktemp -t bad_kdump_conf.XXXXXXXXXX)
|
||||||
cleanup() {
|
cleanup() {
|
||||||
rm -f "$bad_kdump_conf"
|
rm -f "$bad_kdump_conf"
|
||||||
|
rm -f kdump.conf
|
||||||
}
|
}
|
||||||
AfterAll 'cleanup'
|
AfterAll 'cleanup'
|
||||||
|
|
||||||
@ -189,7 +190,10 @@ Describe 'kdumpctl'
|
|||||||
The stderr should include 'Invalid kdump config option blabla'
|
The stderr should include 'Invalid kdump config option blabla'
|
||||||
End
|
End
|
||||||
|
|
||||||
|
Parameters:value aarch64 ppc64le s390x x86_64
|
||||||
|
|
||||||
It 'should be happy with the default kdump.conf'
|
It 'should be happy with the default kdump.conf'
|
||||||
|
./gen-kdump-conf.sh "$1" > kdump.conf
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
# override the KDUMP_CONFIG_FILE variable
|
# override the KDUMP_CONFIG_FILE variable
|
||||||
KDUMP_CONFIG_FILE=./kdump.conf
|
KDUMP_CONFIG_FILE=./kdump.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user