From 9ca51c2d15db263009ca2cbbff4ca997a12e53e6 Mon Sep 17 00:00:00 2001 From: amy0701 Date: Fri, 29 Jul 2011 05:31:57 +0000 Subject: [PATCH] add testcases for regnotif and unregnotif git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10188 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-test/autotest/testcase/regnotif/case0 | 62 ++++++++++++++++++++ xCAT-test/autotest/testcase/unregnotif/case0 | 39 ++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 xCAT-test/autotest/testcase/regnotif/case0 create mode 100644 xCAT-test/autotest/testcase/unregnotif/case0 diff --git a/xCAT-test/autotest/testcase/regnotif/case0 b/xCAT-test/autotest/testcase/regnotif/case0 new file mode 100644 index 000000000..84767bc01 --- /dev/null +++ b/xCAT-test/autotest/testcase/regnotif/case0 @@ -0,0 +1,62 @@ +start:regnotif_null +description:regnotif with no argument +cmd:regnotif +check:rc==0 +check:output=~Usage +end + +start:regnotif_o +description:regnotif with normal argument +cmd:echo "hello,world" > test.pm +check:rc==0 +cmd:regnotif test.pm nodelist -o a,d +check:rc==0 +cmd:tabdump notification +check:rc==0 +check:output=~"test.pm","nodelist","a,d" +cmd:unregnotif test.pm +cmd:rm -f test.pm +end + + +start:regnotif_err +description:regnotif with error arguments +cmd:echo "hello,world" > test.pm +check:rc==0 +cmd:regnotif test.pm -o a,d +check:output=~Usage +cmd:regnotif nodelist -o a,d +check:output=~Usage +cmd:regnotif nodelist +check:output=~Usage +cmd:rm -f test.pm +end + + + +start:regnotif_h +description:regnotif -h and --help +cmd:regnotif -h +check:rc==0 +check:output=~Usage +cmd:regnotif --help +check:rc==0 +check:output=~Usage +end + + +start:regnotif_v +description:regnotif -v and --version +cmd:regnotif -v +check:rc==0 +check:output=~Version|version +cmd:regnotif --version +check:rc==0 +check:output=~Version|version +end + + + + + + diff --git a/xCAT-test/autotest/testcase/unregnotif/case0 b/xCAT-test/autotest/testcase/unregnotif/case0 new file mode 100644 index 000000000..180ae9fac --- /dev/null +++ b/xCAT-test/autotest/testcase/unregnotif/case0 @@ -0,0 +1,39 @@ +start:unregnotif_null +description:unregnotif with no argument +cmd:unregnotif +check:output=~Usage +end + + +start:unregnotif_f +description:unregnotif with a argument filename +cmd:echo "hello" > test.pm +check:rc==0 +cmd:regnotif test.pm nodelist -o a,d +check:rc==0 +cmd:tabdump notification +check:rc==0 +check:output=~"test.pm","nodelist","a,d" +cmd:unregnotif test.pm +check:rc==0 +cmd:tabdump notification +check:output!~test.pm","nodelist","a,d" +cmd:rm -f test.pm +end + + +start:unregnotif_h +description:unregnotif -h and -help +cmd:unregnotif -h +check:output=~Usage +cmd:unregnotif -help +check:output=~Usage +end + +start:unregnotif_v +description:unregnotif -v and -version +cmd:unregnotif -v +check:output=~version|Version +cmd:unregnotif -version +check:output=~version|Version +end