update and add restorexCATdb
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10034 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
ee45b97d2b
commit
c83939aa6a
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
67
xCAT-test/autotest/testcase/restorexCATdb/cases0
Normal file
67
xCAT-test/autotest/testcase/restorexCATdb/cases0
Normal file
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user