From c83939aa6a6477b17a761d140c6150323d33e96b Mon Sep 17 00:00:00 2001 From: amy0701 Date: Thu, 7 Jul 2011 08:52:20 +0000 Subject: [PATCH] update and add restorexCATdb git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10034 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-test/autotest/testcase/dumpxCATdb/cases0 | 40 ++++++++++- .../autotest/testcase/restorexCATdb/cases0 | 67 +++++++++++++++++++ 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 xCAT-test/autotest/testcase/restorexCATdb/cases0 diff --git a/xCAT-test/autotest/testcase/dumpxCATdb/cases0 b/xCAT-test/autotest/testcase/dumpxCATdb/cases0 index c6f8958de..d82ffa5c4 100644 --- a/xCAT-test/autotest/testcase/dumpxCATdb/cases0 +++ b/xCAT-test/autotest/testcase/dumpxCATdb/cases0 @@ -39,7 +39,6 @@ check:output=~site.csv check:output=~eventlog.csv check:output=~auditlog.csv cmd:rm -rf /tmp/db.all -check:rc==0 end start:dumpxCATdb_p_skiptables @@ -69,3 +68,42 @@ cmd:rm -rf /tmp/db.skiptables check:rc==0 end +start:dumpxCATdb_p_nullskiptables_V +description:test verbose and -p +cmd:chtab key=skiptables site.value="" +check:rc==0 +cmd:dumpxCATdb -p /tmp/db -V +check:rc==0 +check:output=~Skipping eventlog +check:output=~Skipping auditlog +check:output=~Dumping site +check:output=~Backup Complete +cmd:rm -rf /tmp/db +end + +start:dumpxCATdb_a_p_nullskiptables_V +description:test -V and -a +cmd:chtab key=skiptables site.value="" +check:rc==0 +cmd:dumpxCATdb -a -p /tmp/db -V +check:rc==0 +check:output=~Dumping eventlog +check:output=~Dumping auditlog +check:output=~Backup Complete +cmd:rm -rf /tmp/db +end + +start:dumpxCATdb_p_V +description:test -p -V +cmd:chtab key=skiptables site.value="passwd" +check:rc==0 +cmd:dumpxCATdb -p /tmp/db -V +check:rc==0 +check:output=~Skipping passwd +check:output=~Backup Complete +cmd:rm -rf /tmp/db +end + + + + diff --git a/xCAT-test/autotest/testcase/restorexCATdb/cases0 b/xCAT-test/autotest/testcase/restorexCATdb/cases0 new file mode 100644 index 000000000..eeb8c87e3 --- /dev/null +++ b/xCAT-test/autotest/testcase/restorexCATdb/cases0 @@ -0,0 +1,67 @@ +start:restorexCAT_h +cmd:restorexCATdb -h +check:rc==0 +check:output=~restorexCATdb +end + +start:restorexCATdb_v +cmd:restorexCATdb -v +check:rc==0 +check:output=~Version +end + +start:restorexcatdb_p +description:restore the xcat database from the /tmp/db +cmd:chtab key=skiptables site.value="" +check:rc==0 +cmd:dumpxCATdb -p /tmp/db1 +check:rc==0 +cmd:ls /tmp/db1|tr " " "\n" >/tmp/db.1 +check:rc==0 +cmd:chtab key=skiptables site.value="passwd" +check:rc==0 +cmd:restorexCATdb -p /tmp/db1 +check:rc==0 +check:output=~Restore of Database Complete +cmd:dumpxCATdb -p /tmp/db2 +check:rc==0 +cmd:ls /tmp/db2|tr " " "\n" >/tmp/db.2 +check:rc==0 +cmd:diff /tmp/db.1 /tmp/db.2 +check:rc==0 +cmd:rm -rf /tmp/db1 /tmp/db2 /tmp/db.1 /tmp/db.2 +end + +start:restorexCATdb_p_V +cmd:chtab key=skiptables site.value="" +check:rc==0 +cmd:dumpxCATdb -a -p /tmp/db +check:rc==0 +cmd:restorexCATdb -p /tmp/db -V +check:rc==0 +check:output=~Restoring +check:output=~Restore of Database Complete +check:output=~Skipping auditlog.csv +check:output=~Skipping eventlog.csv +cmd:rm -rf /tmp/db +end + +start:restorexCATdb_a_p_V +cmd:chtab key=skiptables site.value="" +check:rc==0 +cmd:dumpxCATdb -a -p /tmp/db +check:rc==0 +cmd:restorexCATdb -a -p /tmp/db -V +check:rc==0 +check:output=~Restoring auditlog.csv +check:output=~Restoring eventlog.csv +check:output=~Restore of Database Complete +cmd:rm -rf /tmp/db +end + +start:restorexCATdb_wrongpath +cmd:restorexCATdb -p /tmp/testpath +check:rc!=0 +end + +