]> git.sur5r.net Git - bacula/bacula/commitdiff
Add disk-changer test
authorKern Sibbald <kern@sibbald.com>
Fri, 2 May 2008 19:32:27 +0000 (19:32 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 2 May 2008 19:32:27 +0000 (19:32 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6879 91ce42f0-d328-0410-95d8-f526ca767f89

regress/tests/disk-changer-test [new file with mode: 0755]

diff --git a/regress/tests/disk-changer-test b/regress/tests/disk-changer-test
new file mode 100755 (executable)
index 0000000..193c5a0
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+echo "Unload drive 0"
+bin/disk-changer tmp/disk-changer/conf unload 1 tmp/disk-changer/drive0 0
+echo "rtn=$?"   
+echo "Test what is in drive 0"
+bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive0 0
+echo "rtn=$?"   
+echo "Load Slot 1 into drive 0"
+bin/disk-changer tmp/disk-changer/conf load 1 tmp/disk-changer/drive0 0
+echo "rtn=$?"   
+echo "Test what is in drive 0"
+bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive0 0
+echo "rtn=$?"   
+
+echo "Unload drive 1"
+bin/disk-changer tmp/disk-changer/conf unload 2 tmp/disk-changer/drive1 1
+echo "rtn=$?"   
+echo "Test what is in drive 1"
+bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive1 1
+echo "rtn=$?"   
+echo "Load Slot 2 drive 1"
+bin/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive1 1
+echo "rtn=$?"   
+echo "Test what is in drive 1"
+bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive1 1
+echo "rtn=$?"   
+
+echo "Load Slot 1 into drive 0 -- error"
+bin/disk-changer tmp/disk-changer/conf load 1 tmp/disk-changer/drive0 0
+echo "rtn=$?"   
+echo "Load Slot 2 into drive 1 -- error"
+bin/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive1 1
+echo "rtn=$?"   
+echo "Load Slot 2 in drive 0 -- error"
+bin/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive0 0
+echo "rtn=$?"