diff --git a/vos/test/scripts/README b/vos/test/scripts/README
index 0f97b3f22..c5c225582 100644
--- a/vos/test/scripts/README
+++ b/vos/test/scripts/README
@@ -3,5 +3,8 @@ at the CADC. These tests can only be executed at the CADC against that
service. The vos package must be installed before the these tests
are executed.
-Environment variables (optional):
-VOSPACE_WEBSERVICE = URL of the VOSpace service host (Default: "www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca")
+Environment variables:
+VOSPACE_WEBSERVICE (optional) = URL of the VOSpace service host (Default: "www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca")
+CADC_TESTCERT_PATH (required) = Path to local directories containing 2 proxy certificates:
+ - cadc-auth.pem - proxy certificate of the owner of the vospace root directory
+ - cadc-auth-test.pem - proxy certificate of a valid user.
diff --git a/vos/test/scripts/something.props b/vos/test/scripts/something.props
deleted file mode 100644
index 04cece802..000000000
--- a/vos/test/scripts/something.props
+++ /dev/null
@@ -1 +0,0 @@
-ivo://ivoa.net/vospace/core#MD5=946e13bf8e50a4b6a8ab875d7dac614a
diff --git a/vos/test/scripts/vospace-all.tcsh b/vos/test/scripts/vospace-all.tcsh
index cb825b783..af894d506 100755
--- a/vos/test/scripts/vospace-all.tcsh
+++ b/vos/test/scripts/vospace-all.tcsh
@@ -3,12 +3,12 @@
set THIS_DIR = `dirname $0`
set THIS_DIR = `cd $THIS_DIR && pwd`
-echo "Enter path to the CADC test certificates"
-echo -n "Cert path: "
-set certpath = "$<"
-setenv CADC_TESTCERT_PATH ${certpath}
-
-echo "cert files path: $CADC_TESTCERT_PATH"
+#echo "Enter path to the CADC test certificates"
+#echo -n "Cert path: "
+#set certpath = "$<"
+#setenv CADC_TESTCERT_PATH ${certpath}
+#
+#echo "cert files path: $CADC_TESTCERT_PATH"
echo
echo "*** start all tests ***"
echo "vospace-client-atest.tcsh"
@@ -20,8 +20,8 @@ echo "vospace-delete-permission-atest.tcsh"
$THIS_DIR/vospace-delete-permission-atest.tcsh $args || echo "FAIL vospace-delete-permission-atest.tcsh" && exit -1
echo "vospace-vsync-atest.tcsh"
$THIS_DIR/vospace-vsync-atest.tcsh $args || echo "FAIL vospace-vsync-atest.tcsh" && exit -1
-echo "vospace-quota-atest.tcsh"
-$THIS_DIR/vospace-quota-atest.tcsh $args || echo "FAIL vospace-quota-atest.tcsh" && exit -1
+#echo "vospace-quota-atest.tcsh"
+#$THIS_DIR/vospace-quota-atest.tcsh $args || echo "FAIL vospace-quota-atest.tcsh" && exit -1
echo "vospace-link-atest.tcsh"
$THIS_DIR/vospace-link-atest.tcsh $args || echo "FAIL vospace-link-atest.tcsh" && exit -1
echo "vospace-read-permission-atest.tcsh"
diff --git a/vos/test/scripts/vospace-client-atest.tcsh b/vos/test/scripts/vospace-client-atest.tcsh
index 7902374c1..96669f297 100755
--- a/vos/test/scripts/vospace-client-atest.tcsh
+++ b/vos/test/scripts/vospace-client-atest.tcsh
@@ -12,11 +12,11 @@ else
endif
if (! ${?CADC_TESTCERT_PATH} ) then
- echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of x509_CADCRegtest1.pem cert file"
+ echo "Missing CADC_TESTCERT_PATH location to cadc-auth.pem and cadc-auth-test.pem files"
exit -1
else
- set CERTFILE = "$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
- echo "cert file: (CADC_TESTCERT_PATH env variable): $CERTFILE"
+ echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+ set CERT = "--cert=$CADC_TESTCERT_PATH/cadc-auth.pem"
endif
if (! ${?TMPDIR} ) then
@@ -26,14 +26,13 @@ else
echo "Using ${TMPDIR} for temporary files"
endif
-set LSCMD = "vls -l"
-set MKDIRCMD = "vmkdir"
-set RMCMD = "vrm"
-set CPCMD = "vcp"
-set RMDIRCMD = "vrmdir"
-set CHMODCMD = "vchmod"
-
-set CERT = " --cert=$CERTFILE"
+set LSCMD = "vls -l -k"
+set MKDIRCMD = "vmkdir -k"
+set RMCMD = "vrm -k"
+set CPCMD = "vcp -k"
+set RMDIRCMD = "vrmdir -k"
+set CHMODCMD = "vchmod -k"
+set VTAGCMD = 'vtag -k'
echo "vls command: " $LSCMD $CERT
echo
@@ -50,33 +49,30 @@ foreach resource ($resources)
echo "************* TESTING AGAINST $resource ****************"
# use resourceID in vos-config to determine the base URI
- # vault uses CADCRegtest1, cavern uses home/cadcregtest1
echo $resource | grep "cavern" >& /dev/null
if ( $status == 0) then
- set VOROOT = "arc:"
- set HOME_BASE = "home/cadcregtest1"
+ set VOROOT = "cavern:"
set TESTING_CAVERN = "true"
else
set VOROOT = "vos:"
- set HOME_BASE = "CADCRegtest1"
+
endif
+ set HOME_BASE = "vostools-inttest"
set VOHOME = "$VOROOT""$HOME_BASE"
- set BASE = "$VOHOME/atest"
+ set BASE = $VOHOME
set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
set CONTAINER = $BASE/$TIMESTAMP
echo -n "** checking base URI"
- $LSCMD $CERT $BASE > /dev/null
- if ( $status == 0) then
- echo " [OK]"
- else
- echo -n ", creating base URI"
- exit
- $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
- echo " [OK]"
- endif
+ $RMCMD $CERT $BASE > /dev/null
+
+# echo -n ", creating base URI"
+# $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+# $VTAGCMD $CERT $BASE 'ivo://cadc.nrc.ca/vospace/core#inheritPermissions=true'
+# echo " [OK]"
+
echo -n "** setting home and base to public, no groups"
$CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
echo -n " [OK]"
@@ -107,7 +103,7 @@ foreach resource ($resources)
echo -n "verify public=false after create "
if ( ${?TESTING_CAVERN} ) then
- echo " [SKIPPED, permission inheitance not supported]"
+ echo " [SKIPPED, permission inheritance not supported]"
else
$LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'drw----r--' || echo " [FAIL]" && exit -1
echo " [OK]"
@@ -115,35 +111,35 @@ foreach resource ($resources)
echo -n "check set permission properties "
if ( ${?TESTING_CAVERN} ) then
- echo " [SKIPPED, permission inheitance not supported]"
+ echo " [SKIPPED, permission inheritance not supported]"
else
- $CHMODCMD $CERT g+rw $CONTAINER test:g1 test:g2 || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT g+rw $CONTAINER test-g1 test-g2 || echo " [FAIL]" && exit -1
$LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'drw-rw-r--' || echo " [FAIL]" && exit -1
- $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'test:g1' || echo " [FAIL]" && exit -1
- $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'test:g2' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'test-g1' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'test-g2' || echo " [FAIL]" && exit -1
echo " [OK]"
endif
echo -n "check inherit permission properties "
if ( ${?TESTING_CAVERN} ) then
- echo " [SKIPPED, permission inheitance not supported]"
+ echo " [SKIPPED, permission inheritance not supported]"
else
$MKDIRCMD $CERT $CONTAINER/pub || echo " [FAIL]" && exit -1
$LSCMD $CERT $CONTAINER | grep pub | grep -q 'drw-rw-r--' || echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER | grep pub | grep -q 'test:g1' || echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER | grep pub | grep -q 'test:g2' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep pub | grep -q 'test-g1' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep pub | grep -q 'test-g2' || echo " [FAIL]" && exit -1
echo " [OK]"
endif
echo -n "check inherit + change certain properties "
if ( ${?TESTING_CAVERN} ) then
- echo " [SKIPPED, permission inheitance not supported]"
+ echo " [SKIPPED, permission inheritance not supported]"
else
$MKDIRCMD $CERT $CONTAINER/priv || echo " [FAIL]" && exit -1
- $CHMODCMD $CERT g+r $CONTAINER/priv test:g3 || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT g+r $CONTAINER/priv test-g3 || echo " [FAIL]" && exit -1
$LSCMD $CERT $CONTAINER | grep priv | grep -q 'drw-rw-r--' || echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER | grep priv | grep -q 'test:g3' || echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER | grep priv | grep -q 'test:g2' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep priv | grep -q 'test-g3' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep priv | grep -q 'test-g2' || echo " [FAIL]" && exit -1
echo " [OK]"
endif
@@ -159,24 +155,24 @@ foreach resource ($resources)
echo -n "copy empty files"
rm -f /tmp/zerosize.txt
touch /tmp/zerosize.txt
- $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL1]" && exit -1
$LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null || echo " [FAIL]" && exit -1
# repeat
- $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL2]" && exit -1
$LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null || echo " [FAIL]" && exit -1
# change size
echo "test" > /tmp/zerosize.txt
- $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL3]" && exit -1
$LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null && echo " [FAIL]" && exit -1
# repeat
- $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL4]" && exit -1
$LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null && echo " [FAIL]" && exit -1
# make it back 0 size
/bin/cp /dev/null /tmp/zerosize.txt
- $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL5]" && exit -1
$LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null || echo " [FAIL]" && exit -1
# repeat
- $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL6]" && exit -1
$LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null || echo " [FAIL]" && exit -1
echo " [OK]"
@@ -187,8 +183,8 @@ foreach resource ($resources)
echo " [OK]"
echo -n "copy data node to local filesystem "
- $CPCMD $CERT $CONTAINER/something.png $THIS_DIR/something.png.2 || echo " [FAIL]" && exit -1
- cmp $THIS_DIR/something.png $THIS_DIR/something.png.2 || echo " [FAIL]" && exit -1
+ $CPCMD $CERT $CONTAINER/something.png $THIS_DIR/something.png.2 || echo " [FAIL1]" && exit -1
+ cmp $THIS_DIR/something.png $THIS_DIR/something.png.2 || echo " [FAIL2]" && exit -1
\rm -f $THIS_DIR/something.png.2
echo " [OK]"
@@ -210,7 +206,7 @@ foreach resource ($resources)
echo " [OK]"
echo -n "Do a real cutout of a known file"
- #$CPCMD $CERT "vos:CADCRegtest1/DONOTDELETE_VOSPACE_CUTOUT_TEST.fits(34.436194,19.34665,0.01)" $TMPDIR/testcutout || echo " [FAIL]" && exit -1
+ #$CPCMD $CERT "vos:CADCAuthtest1/DONOTDELETE_VOSPACE_CUTOUT_TEST.fits(34.436194,19.34665,0.01)" $TMPDIR/testcutout || echo " [FAIL]" && exit -1
#if (`cat $TMPDIR/testcutout | md5` != "cb7d6a829277975d1016a769970ec45a") then
# echo " [FAIL]" && exit -1
#endif
@@ -251,19 +247,19 @@ foreach resource ($resources)
$RMCMD $CERT $CONTAINER/something.png >& /dev/null && echo " [FAIL]" && exit -1
echo " [OK]"
- echo -n "delete non-empty container "
- $RMDIRCMD $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER/something2.png >& /dev/null && echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
- echo " [OK]"
-
- echo -n "delete empty container "
- $MKDIRCMD $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
- $RMDIRCMD $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
- echo " [OK]"
- echo
+# echo -n "delete non-empty container - THIS NOW REQURIES vrm -R INSTEAD"
+# $RMCMD -R $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
+# $LSCMD $CERT $CONTAINER/something2.png >& /dev/null && echo " [FAIL]" && exit -1
+# $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+# echo " [OK]"
+
+# echo -n "delete empty container "
+# $MKDIRCMD $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
+# $LSCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+# $RMDIRCMD $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
+# $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+# echo " [OK]"
+# echo
echo "*** test sequence passed for resource $resource ***"
end
diff --git a/vos/test/scripts/vospace-delete-permission-atest.tcsh b/vos/test/scripts/vospace-delete-permission-atest.tcsh
index 6e24f1b8b..be3ee6663 100755
--- a/vos/test/scripts/vospace-delete-permission-atest.tcsh
+++ b/vos/test/scripts/vospace-delete-permission-atest.tcsh
@@ -10,10 +10,12 @@ else
endif
if (! ${?CADC_TESTCERT_PATH} ) then
- echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of test cert files"
- exit -1
+ echo "Missing CADC_TESTCERT_PATH location to cadc-auth.pem and cadc-auth-test.pem files"
+ exit -1
else
echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+ set CERT = "--cert=$CADC_TESTCERT_PATH/cadc-auth.pem"
+ set CERT1 = "--cert=$CADC_TESTCERT_PATH/cadc-auth-test.pem"
endif
if($#argv == 0) then
@@ -24,44 +26,50 @@ else
echo "Testing against resources: $resources"
endif
-set CHMODCMD = "vchmod"
-set MKDIRCMD = "vmkdir"
-set LSCMD = "vls -l"
-set CPCMD = "vcp"
-set RMDIRCMD = "vrmdir"
+set CHMODCMD = "vchmod -k"
+set MKDIRCMD = "vmkdir -k"
+set LSCMD = "vls -k -l"
+set CPCMD = "vcp -k"
+set RMDIRCMD = "vrmdir -k"
+set RMCMD = "vrm -k"
+set VTAGCMD = "vtag -k"
-set CERT = "--cert=$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
+set CADC_TESTCERT_PATH = "/Users/adriand/A/test-certificates"
+set CERT = "--cert=$CADC_TESTCERT_PATH/cadcproxy.pem"
set CERT1 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest1.pem"
set CERT2 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest2.pem"
-echo "vchmod command: " $CHMODCMD $CERT
-echo "vchmod command 1: " $CHMODCMD $CERT1
-echo "vchmod command 2: " $CHMODCMD $CERT2
-
-echo
-
# group 3000 aka CADC_TEST_GROUP1 has members: CADCAuthtest1
set GROUP1 = "CADC_TEST_GROUP1"
# group 3100 aka CADC_TEST_GROUP2 has members: CADCAuthtest1, CADCAuthtest2
set GROUP2 = "CADC_TEST_GROUP2"
+echo "vchmod command: " $CHMODCMD $CERT
+echo "vchmod command 1: " $CHMODCMD $CERT1
+
+echo
+
foreach resource ($resources)
echo "************* TESTING AGAINST $resource ****************"
- # vault uses CADCRegtest1, cavern uses home/cadcregtest1
echo $resource | grep "cavern" >& /dev/null
if ( $status == 0) then
- set HOME_BASE = "home/cadcregtest1"
- set VOROOT = "arc:"
+ set VOROOT = "cavern:"
set TESTING_CAVERN = "true"
else
set VOROOT = "vos:"
- set HOME_BASE = "CADCRegtest1"
endif
+ set HOME_BASE = "vostools-inttest"
set VOHOME = "$VOROOT""$HOME_BASE"
- set BASE = "$VOHOME/atest"
+ set BASE = $VOHOME
+
+# echo -n ", creating base URI"
+# $RMCMD -R $CERT $BASE > /dev/null
+# $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+# $VTAGCMD $CERT $BASE 'ivo://cadc.nrc.ca/vospace/core#inheritPermissions=true'
+ echo " [OK]"
set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
set CONTAINER = $BASE/$TIMESTAMP
@@ -130,7 +138,8 @@ foreach resource ($resources)
if ( ${?TESTING_CAVERN} ) then
echo " [SKIPPED, permission inheritance not supported]"
else
- $RMDIRCMD $CERT1 $CONTAINER/sub1 >& /dev/null || echo " [FAIL]" && exit -1
+ echo "$RMCMD -R $CERT1 $CONTAINER/sub1"
+ $RMCMD -R $CERT1 $CONTAINER/sub1 >& /dev/null || echo " [FAIL]" && exit -1
echo -n " verify "
$LSCMD $CERT $CONTAINER/sub1 >& /dev/null && echo " [FAIL]" && exit -1
echo " [OK]"
@@ -159,7 +168,7 @@ foreach resource ($resources)
echo " [OK]"
echo -n "test root delete"
- $RMDIRCMD $CERT $CONTAINER/sub1 >& /dev/null || echo " [FAIL]" && exit -1
+ $RMCMD -R $CERT $CONTAINER/sub1 >& /dev/null || echo " [FAIL]" && exit -1
echo -n " verify "
$LSCMD $CERT1 $CONTAINER/sub1 >& /dev/null && echo " [FAIL]" && exit -1
echo " [OK]"
diff --git a/vos/test/scripts/vospace-link-atest.tcsh b/vos/test/scripts/vospace-link-atest.tcsh
index f0f793853..b2021e893 100755
--- a/vos/test/scripts/vospace-link-atest.tcsh
+++ b/vos/test/scripts/vospace-link-atest.tcsh
@@ -4,10 +4,12 @@ set THIS_DIR = `dirname $0`
set THIS_DIR = `cd $THIS_DIR && pwd`
if (! ${?CADC_TESTCERT_PATH} ) then
- echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of test cert files"
- exit -1
+ echo "Missing CADC_TESTCERT_PATH location to cadc-auth.pem and cadc-auth-test.pem files"
+ exit -1
else
echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+ set CERT = "--cert=$CADC_TESTCERT_PATH/cadc-auth.pem"
+ set CERT1 = "--cert=$CADC_TESTCERT_PATH/cadc-auth-test.pem"
endif
if($#argv == 0) then
@@ -20,16 +22,14 @@ endif
date
-set LSCMD = "vls"
-set MKDIRCMD = "vmkdir"
-set RMCMD = "vrm"
-set CPCMD = "vcp"
-set RMDIRCMD = "vrmdir"
-set LNCMD = "vln"
-set CHMODCMD = "vchmod"
-
-set CERT = " --cert=$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
-set CERT2 = " --cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest1.pem"
+set LSCMD = "vls -k"
+set MKDIRCMD = "vmkdir -k"
+set RMCMD = "vrm -k"
+set CPCMD = "vcp -k"
+set RMDIRCMD = "vrmdir -k"
+set LNCMD = "vln -k"
+set CHMODCMD = "vchmod -k"
+set VTAGCMD = "vtag -k"
echo "command: " $LNCMD $CERT
echo
@@ -37,32 +37,28 @@ echo
foreach resource ($resources)
echo "************* TESTING AGAINST $resource ****************"
- # vault uses CADCRegtest1, cavern uses home/cadcregtest1
echo $resource | grep "cavern" >& /dev/null
if ( $status == 0) then
- set HOME_BASE = "home/cadcregtest1"
- set VOROOT = "arc:"
+ set VOROOT = "cavern:"
set TESTING_CAVERN = "true"
else
set VOROOT = "vos:"
- set HOME_BASE = "CADCRegtest1"
endif
+ set HOME_BASE = "vostools-inttest"
set VOHOME = "$VOROOT""$HOME_BASE"
- set BASE = "$VOHOME/atest"
+ set BASE = $VOHOME
set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
set CONTAINER = $BASE/$TIMESTAMP
- echo -n "** checking base URI"
- $LSCMD -v $CERT $BASE >& /dev/null
- if ( $status == 0) then
- echo " [OK]"
- else
- echo -n ", creating base URI"
- $MKDIRCMD $CERT $BASE >& /dev/null || echo " [FAIL]" && exit -1
- echo " [OK]"
- endif
+# echo -n "** checking base URI"
+# $RMCMD -R $CERT $BASE > /dev/null
+# echo -n ", creating base URI"
+# $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+# $VTAGCMD $CERT $BASE 'ivo://cadc.nrc.ca/vospace/core#inheritPermissions=true'
+# echo " [OK]"
+
echo -n "** setting home and base to public, no groups"
$CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
$CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
@@ -92,7 +88,6 @@ foreach resource ($resources)
echo -n "list container"
# content displayed unless -l and no / at the end
# content displayed
- $LSCMD $CERT $CONTAINER/clink | grep -q something || echo " [FAIL]" && exit -1
$LSCMD $CERT $CONTAINER/clink/ | grep -q something || echo " [FAIL]" && exit -1
$LSCMD $CERT -l $CONTAINER/clink/ | grep -q something || echo " [FAIL]" && exit -1
# case where the content of the target is not displayed just the link
@@ -105,7 +100,7 @@ foreach resource ($resources)
echo " [OK]"
echo -n "follow the link without read permission and fail"
- $CPCMD $CERT2 $CONTAINER/clink/something.png /tmp >& /dev/null && echo " [FAIL]" && exit -1
+ $CPCMD $CERT1 $CONTAINER/clink/something.png /tmp >& /dev/null && echo " [FAIL]" && exit -1
echo " [OK]"
echo -n "create link to target file"
@@ -131,7 +126,7 @@ foreach resource ($resources)
echo -n "create link to unknown scheme in URI"
#TODO not sure why this is not working anymore
- #$LNCMD $CERT unknown://cadc.nrc.ca~vault/CADCRegtest1 $CONTAINER/e2link >& /dev/null && echo " [FAIL]" && exit -1
+ #$LNCMD $CERT unknown://cadc.nrc.ca~vault/CADCAuthtest1 $CONTAINER/e2link >& /dev/null && echo " [FAIL]" && exit -1
echo " [SKIPPED - TODO]"
echo -n "follow the invalid link and fail"
@@ -163,25 +158,25 @@ foreach resource ($resources)
echo " [OK]"
echo -n "copy file to target through link"
- if ( ${?TESTING_CAVERN} ) then
- echo " [SKIPPED, vos/issues/83]"
- else
+# if ( ${?TESTING_CAVERN} ) then
+# echo " [SKIPPED, vos/issues/83]"
+# else
$CPCMD $CERT $THIS_DIR/something.png $CONTAINER/clink/something2.png || echo " [FAIL]" && exit -1
echo " [OK]"
endif
echo -n "Get the file through the link"
- if ( ${?TESTING_CAVERN} ) then
- echo " [SKIPPED, vos/issues/83]"
- else
+# if ( ${?TESTING_CAVERN} ) then
+# echo " [SKIPPED, vos/issues/83]"
+# else
$CPCMD $CERT $CONTAINER/clink/something2.png /tmp || echo " [FAIL]" && exit -1
echo " [OK]"
endif
echo -n "Get the file through the target"
- if ( ${?TESTING_CAVERN} ) then
- echo " [SKIPPED, vos/issues/83]"
- else
+# if ( ${?TESTING_CAVERN} ) then
+# echo " [SKIPPED, vos/issues/83]"
+# else
$CPCMD $CERT $CONTAINER/target/something2.png /tmp || echo " [FAIL]" && exit -1
echo " [OK]"
endif
diff --git a/vos/test/scripts/vospace-lock-atest.tcsh b/vos/test/scripts/vospace-lock-atest.tcsh
index 37c0318ff..0f76fe1a9 100755
--- a/vos/test/scripts/vospace-lock-atest.tcsh
+++ b/vos/test/scripts/vospace-lock-atest.tcsh
@@ -10,11 +10,12 @@ else
echo "WebService URL (VOSPACE_WEBSERVICE env variable): $VOSPACE_WEBSERVICE"
endif
if (! ${?CADC_TESTCERT_PATH} ) then
- echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of x509_CADCRegtest1.pem cert file"
- exit -1
+ echo "Missing CADC_TESTCERT_PATH location to cadc-auth.pem and cadc-auth-test.pem files"
+ exit -1
else
- set CERTFILE = "$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
- echo "cert file: ($CADC_TESTCERT_PATH env variable): $CERTFILE"
+ echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+ set CERT = "--cert=$CADC_TESTCERT_PATH/cadc-auth.pem"
+ set CERT1 = "--cert=$CADC_TESTCERT_PATH/cadc-auth-test.pem"
endif
if($#argv == 0) then
@@ -25,70 +26,60 @@ else
echo "Testing against resources: $resources"
endif
-set LSCMD = "vls -l"
-set MKDIRCMD = "vmkdir"
-set RMCMD = "vrm"
-set CPCMD = "vcp"
+set LSCMD = "vls -l -k"
+set MKDIRCMD = "vmkdir -k"
+set RMCMD = "vrm -k"
+set CPCMD = "vcp -k"
-set MVCMD = "vmv"
-set RMDIRCMD = "vrmdir"
-set CHMODCMD = "vchmod"
-set TAGCMD = "vtag"
-set LNCMD = "vln"
-set LOCKCMD = "vlock"
-
-set CERT = " --cert=$CERTFILE"
+set MVCMD = "vmv -k"
+set RMDIRCMD = "vrmdir -k"
+set CHMODCMD = "vchmod -k"
+set TAGCMD = "vtag -k"
+set LNCMD = "vln -k"
+set LOCKCMD = "vlock -k"
set SUCCESS = "false"
set LIST_ARGS = "ivo://cadc.nrc.ca/vospace/core#islocked"
set VLOCK_ARGS = "--lock"
set VUNLOCK_ARGS = "--unlock"
+set VTAGCMD = "vtag -k"
echo "vls command: " $LSCMD $CERT
echo
foreach resource ($resources)
- echo "************* TESTING AGAINST $resource ****************"
-
- # vault uses CADCRegtest1, cavern uses home/cadcregtest1
- echo $resource | grep "cavern" >& /dev/null
- if ( $status == 0) then
- set HOME_BASE = "home/cadcregtest1"
- set VOROOT = "arc:"
- set TESTING_CAVERN = "true"
- else
- set VOROOT = "vos:"
- set HOME_BASE = "CADCRegtest1"
- endif
- set VOHOME = "$VOROOT""$HOME_BASE"
- set BASE = "$VOHOME/atest/locktest"
-
- set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
- set CONTAINER = $BASE/$TIMESTAMP
+ echo "************* TESTING AGAINST $resource ****************"
- set TEMPCONTAINER = $BASE/$TIMESTAMP"-temp"
-
-
- echo "test setup"
- echo -n "** checking base URI "
-
- $LSCMD $CERT $BASE > /dev/null
+ echo $resource | grep "cavern" >& /dev/null
if ( $status == 0) then
- echo " [OK]"
+ set VOROOT = "cavern:"
+ set TESTING_CAVERN = "true"
else
- echo -n ", creating base URI"
- exit
- $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
- echo " [OK]"
+ set VOROOT = "vos:"
endif
- echo -n "** setting home to public, no groups "
+ set HOME_BASE = "vostools-inttest"
+ set VOHOME = "$VOROOT""$HOME_BASE"
+ set BASE = $VOHOME
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
+
+# echo -n "** checking base URI"
+# $RMCMD -R $CERT $BASE > /dev/null
+# echo -n ", creating base URI"
+# $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+# $VTAGCMD $CERT $BASE 'ivo://cadc.nrc.ca/vospace/core#inheritPermissions=true'
+# echo " [OK]"
+
+ echo -n "** setting home and base to public, no groups"
$CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
- echo " [OK]"
- echo -n "** setting base to public, no groups "
$CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
echo " [OK]"
+
+ set TEMPCONTAINER = $BASE/$TIMESTAMP"-temp"
+
echo "** test container: ${CONTAINER}"
echo
echo "*** starting test sequence ***"
@@ -130,10 +121,12 @@ foreach resource ($resources)
if ( ${?TESTING_CAVERN} ) then
echo " [SKIPPED, vos/issues/82]"
else
+ echo "$LOCKCMD $CERT $CONTAINER $VUNLOCK_ARGS"
$LOCKCMD $CERT $CONTAINER $VUNLOCK_ARGS > /dev/null || echo " [FAIL]" && exit -1
echo " [OK]"
echo -n "check unlocked container "
- $TAGCMD $CERT $CONTAINER $LIST_ARGS | grep -q None && set SUCCESS = "true"
+ echo "$TAGCMD $CERT $CONTAINER $LIST_ARGS"
+ $TAGCMD $CERT $CONTAINER $LIST_ARGS | grep -q false && set SUCCESS = "true"
if ( ${SUCCESS} == "true" ) then
set SUCCESS = "false"
@@ -182,7 +175,7 @@ foreach resource ($resources)
$LOCKCMD $CERT $CONTAINER/target $VUNLOCK_ARGS> /dev/null || echo " [FAIL]" && exit -1
echo " [OK]"
echo -n "check unlocked link "
- $TAGCMD $CERT $CONTAINER/target $LIST_ARGS | grep -q None && set SUCCESS = "true"
+ $TAGCMD $CERT $CONTAINER/target $LIST_ARGS | grep -q false && set SUCCESS = "true"
if ( ${SUCCESS} == "true" ) then
set SUCCESS = "false"
@@ -233,7 +226,7 @@ foreach resource ($resources)
$LOCKCMD $CERT $CONTAINER/something.png $VUNLOCK_ARGS> /dev/null || echo " [FAIL]" && exit -1
echo " [OK]"
echo -n "check unlocked node "
- $TAGCMD $CERT $CONTAINER/something.png $LIST_ARGS | grep -q None && set SUCCESS = "true"
+ $TAGCMD $CERT $CONTAINER/something.png $LIST_ARGS | grep -q false && set SUCCESS = "true"
if ( ${SUCCESS} == "true" ) then
set SUCCESS = "false"
echo " [OK]"
@@ -252,7 +245,7 @@ foreach resource ($resources)
echo -n "delete non-empty container "
- $RMDIRCMD $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
+ $RMCMD $CERT -R $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
$TAGCMD $CERT $CONTAINER $LIST_ARGS >& /dev/null || set SUCCESS = "true"
if ( ${SUCCESS} == "true" ) then
set SUCCESS = "false"
diff --git a/vos/test/scripts/vospace-move-atest.tcsh b/vos/test/scripts/vospace-move-atest.tcsh
index 098af63f3..d33147674 100755
--- a/vos/test/scripts/vospace-move-atest.tcsh
+++ b/vos/test/scripts/vospace-move-atest.tcsh
@@ -10,10 +10,12 @@ else
endif
if (! ${?CADC_TESTCERT_PATH} ) then
- echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of test cert files"
- exit -1
+ echo "Missing CADC_TESTCERT_PATH location to cadc-auth.pem and cadc-auth-test.pem files"
+ exit -1
else
echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+ set CERT = "--cert=$CADC_TESTCERT_PATH/cadc-auth.pem"
+ set CERT1 = "--cert=$CADC_TESTCERT_PATH/cadc-auth-test.pem"
endif
if($#argv == 0) then
@@ -25,54 +27,40 @@ else
endif
-set LSCMD = "vls"
-set MKDIRCMD = "vmkdir"
-set RMCMD = "vrm"
-set CPCMD = "vcp"
-set RMDIRCMD = "vrmdir"
-set MVCMD = "vmv"
-set CHMODCMD = "vchmod"
-
-
-set CERT = "--cert=$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
-set CERT1 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest1.pem"
-set CERT2 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest2.pem"
-
-# group 3000 aka CADC_TEST_GROUP1 has members: CADCAuthtest1
-set GROUP1 = "ivo://cadc.nrc.ca/gms#CADC_TEST_GROUP1"
-
-# group 3100 aka CADC_TEST_GROUP2 has members: CADCAuthtest1, CADCAuthtest2
-set GROUP2 = "ivo://cadc.nrc.ca/gms#CADC_TEST_GROUP2"
+set LSCMD = "vls -k"
+set MKDIRCMD = "vmkdir -k"
+set RMCMD = "vrm -k"
+set CPCMD = "vcp -k"
+set RMDIRCMD = "vrmdir -k"
+set MVCMD = "vmv -k"
+set CHMODCMD = "vchmod -k"
+set VTAGCMD = "vtag -k"
foreach resource ($resources)
echo "************* TESTING AGAINST $resource ****************"
- # vault uses CADCRegtest1, cavern uses home/cadcregtest1
+ # vault uses CADCAuthtest1, cavern uses home/cadcauthtest1
echo $resource | grep "cavern" >& /dev/null
if ( $status == 0) then
- set HOME_BASE = "home/cadcregtest1"
- set VOROOT = "arc:"
+ set VOROOT = "cavern:"
set TESTING_CAVERN = "true"
else
set VOROOT = "vos:"
- set HOME_BASE = "CADCRegtest1"
endif
- set VOHOME = "$VOROOT$HOME_BASE"
- set BASE = "$VOHOME/atest"
+ set HOME_BASE = "vostools-inttest"
+ set VOHOME = "$VOROOT""$HOME_BASE"
+ set BASE = $VOHOME
set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
set CONTAINER = $BASE/$TIMESTAMP
echo -n "** checking base URI"
- $LSCMD $CERT $BASE > /dev/null
- if ( $status == 0) then
- echo " [OK]"
- else
- echo -n ", creating base URI"
- $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
- echo " [OK]"
- endif
+# $RMCMD -R $CERT $BASE > /dev/null
+# echo -n ", creating base URI"
+# $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+# $VTAGCMD $CERT $BASE 'ivo://cadc.nrc.ca/vospace/core#inheritPermissions=true'
+# echo " [OK]"
echo -n "** setting home and base to public"
$CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
@@ -135,19 +123,19 @@ foreach resource ($resources)
echo " [OK]"
echo -n "check no write permission on source data node (fail)"
- $MVCMD $CERT2 $CONTAINER/b $CONTAINER/d >& /dev/null && echo " [FAIL]" && exit -1
+ $MVCMD $CERT1 $CONTAINER/b $CONTAINER/d >& /dev/null && echo " [FAIL]" && exit -1
echo -n " verify "
$LSCMD $CERT $CONTAINER/b > /dev/null || echo " [FAIL]" && exit -1
echo " [OK]"
echo -n "check no recursive write permission on source container node (fail)"
- $MVCMD $CERT2 $CONTAINER/a $CONTAINER/d >& /dev/null && echo " [FAIL]" && exit -1
+ $MVCMD $CERT1 $CONTAINER/a $CONTAINER/d >& /dev/null && echo " [FAIL]" && exit -1
echo -n " verify "
$LSCMD $CERT $CONTAINER/a > /dev/null || echo " [FAIL]" && exit -1
echo " [OK]"
echo -n "check no write permission on dest (fail)"
- $MVCMD $CERT2 $CONTAINER/c $CONTAINER/e >& /dev/null && echo " [FAIL]" && exit -1
+ $MVCMD $CERT1 $CONTAINER/c $CONTAINER/e >& /dev/null && echo " [FAIL]" && exit -1
echo -n " verify "
$LSCMD $CERT $CONTAINER/c > /dev/null || echo " [FAIL]" && exit -1
echo " [OK]"
diff --git a/vos/test/scripts/vospace-node-properties.tcsh b/vos/test/scripts/vospace-node-properties.tcsh
index 0c57de038..1ff65a5d4 100755
--- a/vos/test/scripts/vospace-node-properties.tcsh
+++ b/vos/test/scripts/vospace-node-properties.tcsh
@@ -10,13 +10,17 @@ else
endif
if (! ${?CADC_TESTCERT_PATH} ) then
- echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of x509_CADCRegtest1.pem cert file"
- exit -1
+ echo "Missing CADC_TESTCERT_PATH location to cadc-auth.pem and cadc-auth-test.pem files"
+ exit -1
else
- set CERTFILE = "$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
- echo "cert file: ($CADC_TESTCERT_PATH env variable): $CERTFILE"
+ echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+ set CERT = "--cert=$CADC_TESTCERT_PATH/cadc-auth.pem"
+ set CERT1 = "--cert=$CADC_TESTCERT_PATH/cadc-auth-test.pem"
endif
+
+set GROUP = "opencadc-vospace-test"
+
if($#argv == 0) then
set resources = "vault cavern"
echo "Testing against default resources: $resources"
@@ -26,52 +30,45 @@ else
endif
-set LSCMD = "vls -l"
-set MKDIRCMD = "vmkdir"
-set RMDIRCMD = "vrmdir"
-set CHMODCMD = "vchmod"
-
-
-set CERT = "--cert=$CERTFILE"
+set LSCMD = "vls -lk"
+set MKDIRCMD = "vmkdir -k"
+set RMDIRCMD = "vrmdir -k"
+set RMCMD = "vrm -k"
+set CHMODCMD = "vchmod -k"
+set VTAGCMD = "vtag -k"
echo
-# group 3000 aka CADC_TEST_GROUP1 has members: CADCAuthtest1
-set GROUP1 = "CADC_TEST_GROUP1"
-
-# group 3100 aka CADC_TEST_GROUP2 has members: CADCAuthtest1, CADCAuthtest2
-set GROUP2 = "CADC_TEST_GROUP2"
-
foreach resource ($resources)
echo "************* TESTING AGAINST $resource ****************"
- # vault uses CADCRegtest1, cavern uses home/cadcregtest1
echo $resource | grep "cavern" >& /dev/null
if ( $status == 0) then
- set HOME_BASE = "home/cadcregtest1"
- set VOROOT = "arc:"
+ set VOROOT = "cavern:"
set TESTING_CAVERN = "true"
else
set VOROOT = "vos:"
- set HOME_BASE = "CADCRegtest1"
endif
+ set HOME_BASE = "vostools-inttest"
set VOHOME = "$VOROOT""$HOME_BASE"
- set BASE = "$VOHOME/atest"
+ set BASE = $VOHOME
set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
set CONTAINER = $BASE/$TIMESTAMP
echo -n "** checking base URI"
- $LSCMD $CERT $BASE > /dev/null
- if ( $status == 0) then
- echo " [OK]"
- else
- echo -n ", creating base URI"
- $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
- echo " [OK]"
- endif
+# $RMCMD -R $CERT $BASE > /dev/null
+# echo -n ", creating base URI"
+# $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+# $VTAGCMD $CERT $BASE 'ivo://cadc.nrc.ca/vospace/core#inheritPermissions=true'
+# echo " [OK]"
+
+ echo -n "** setting home and base to public, no groups"
+ $CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
echo -n "** setting home and base to public"
$CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
@@ -85,9 +82,9 @@ foreach resource ($resources)
echo
echo -n "create container (no permissions) "
- $MKDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
- $CHMODCMD $CERT o-r $CONTAINER || echo " [FAIL]" && exit -1
- $CHMODCMD $CERT g-r $CONTAINER || echo " [FAIL]" && exit -1
+ $MKDIRCMD $CERT $CONTAINER || echo " [FAIL1]" && exit -1
+ $CHMODCMD $CERT o-r $CONTAINER || echo " [FAIL2]" && exit -1
+ $CHMODCMD $CERT g-r $CONTAINER || echo " [FAIL3]" && exit -1
echo -n " verify "
$LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q "drw-------" || echo " [FAIL]" && exit -1
echo " [OK]"
@@ -110,118 +107,90 @@ foreach resource ($resources)
$LSCMD $CERT $CONTAINER | grep ccc | grep -q "drw-------" || echo " [FAIL]" && exit -1
echo " [OK]"
- echo -n "test vchmod with recursive option"
- if ( ${?TESTING_CAVERN} ) then
- set ERROR = "`$CHMODCMD $CERT -R g+r $CONTAINER $GROUP1 |& cat`"
- echo "$ERROR" | grep -q "Operation not supported"
- if ( $status == 0 ) then
- echo " [SKIPPED, recursive vchmod not supported]"
- else
- echo " [FAIL]" && exit -1
- endif
- else
- $CHMODCMD $CERT -R g+r $CONTAINER $GROUP1 || echo " [FAIL]" && exit -1
- echo -n " verify "
- $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER | grep aaa | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER | grep ccc | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER/aaa | grep bbb | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
- echo " [OK]"
- endif
+# echo -n "test vchmod with recursive option"
+#
+# $CHMODCMD $CERT -R g+r $CONTAINER $GROUP || echo " [FAIL]" && exit -1
+# echo -n " verify "
+# $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+# $LSCMD $CERT $CONTAINER | grep aaa | grep $GROUP | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+# $LSCMD $CERT $CONTAINER | grep ccc | grep $GROUP | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+# $LSCMD $CERT $CONTAINER/aaa | grep bbb | grep $GROUP | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+# echo " [OK]"
echo -n "test vchmod with multiple groups"
- if ( ${?TESTING_CAVERN} ) then
- echo " [SKIPPED, impromptu groups are not supported]"
- else
- set MULTIGROUP = "A B C"
- $CHMODCMD $CERT -R g+r $CONTAINER/aaa "$MULTIGROUP" || echo " [FAIL]" && exit -1
- echo -n " verify "
- $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
- $LSCMD $CERT $CONTAINER | grep aaa | grep "$MULTIGROUP" | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
- echo " [OK]"
- endif
+ set MULTIGROUP = "ABC $GROUP"
+ $CHMODCMD $CERT g+r $CONTAINER/aaa "$MULTIGROUP" || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+ echo ""
+ $LSCMD $CERT $CONTAINER | grep aaa | grep "$MULTIGROUP" | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+ echo " [OK]"
echo -n "make a sub-container public"
- if ( ${?TESTING_CAVERN} ) then
- echo " [SKIPPED, impromptu groups are not supported]"
- else
- $CHMODCMD $CERT o+r $CONTAINER/aaa/bbb || echo " [FAIL]" && exit -1
- echo -n " verify "
- $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL1]" && exit -1
- $LSCMD $CERT $CONTAINER | grep aaa | grep "$MULTIGROUP" | grep -q "drw-r-----" || echo " [FAIL2]" && exit -1
- $LSCMD $CERT $CONTAINER | grep ccc | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL3]" && exit -1
- $LSCMD $CERT $CONTAINER/aaa | grep bbb | grep "$MULTIGROUP" | grep -q "drw-r--r--" || echo " [FAIL4]" && exit -1
- echo " [OK]"
- endif
-
- echo -n "recursively make all directories public"
- if ( ${?TESTING_CAVERN} ) then
- set ERROR = "`$CHMODCMD $CERT -R o+r $CONTAINER |& cat`"
- echo "$ERROR" | grep -q "Operation not supported"
- if ( $status == 0 ) then
- echo " [SKIPPED, recursive vchmod not supported]"
- else
- echo " [FAIL]" && exit -1
- endif
- else
- $CHMODCMD $CERT -R o+r $CONTAINER || echo " [FAIL]" && exit -1
- echo -n " verify "
- $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP1 | grep -q "drw-r--r--" || echo " [FAIL1]" && exit -1
- $LSCMD $CERT $CONTAINER | grep aaa | grep "$MULTIGROUP" | grep -q "drw-r--r--" || echo " [FAIL2]" && exit -1
- $LSCMD $CERT $CONTAINER | grep ccc | grep $GROUP1 | grep -q "drw-r--r--" || echo " [FAIL3]" && exit -1
- $LSCMD $CERT $CONTAINER/aaa | grep bbb | grep "$MULTIGROUP" | grep -q "drw-r--r--" || echo " [FAIL4]" && exit -1
- echo " [OK]"
- endif
+
+ $CHMODCMD $CERT o+r $CONTAINER/aaa/bbb || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP | grep -q "drw-r-----" || echo " [FAIL1]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep aaa | grep "$MULTIGROUP" | grep -q "drw-r-----" || echo " [FAIL2]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep ccc | grep $GROUP | grep -q "drw-r-----" || echo " [FAIL3]" && exit -1
+ $LSCMD $CERT $CONTAINER/aaa | grep bbb | grep "$MULTIGROUP" | grep -q "drw-r--r--" || echo " [FAIL4]" && exit -1
+ echo " [OK]"
+
+# echo -n "recursively make all directories public"
+# $CHMODCMD $CERT -R o+r $CONTAINER || echo " [FAIL]" && exit -1
+# echo -n " verify "
+# $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP | grep -q "drw-r--r--" || echo " [FAIL1]" && exit -1
+# $LSCMD $CERT $CONTAINER | grep aaa | grep "$MULTIGROUP" | grep -q "drw-r--r--" || echo " [FAIL2]" && exit -1
+# $LSCMD $CERT $CONTAINER | grep ccc | grep $GROUP | grep -q "drw-r--r--" || echo " [FAIL3]" && exit -1
+# $LSCMD $CERT $CONTAINER/aaa | grep bbb | grep "$MULTIGROUP" | grep -q "drw-r--r--" || echo " [FAIL4]" && exit -1
+# echo " [OK]"
# test interupt
- echo -n "interrupt recursive vchmod"
- if ( ${?TESTING_CAVERN} ) then
- echo " [SKIPPED, recursive vchmod not supported]"
- else
- set TESTDIR = "testrecursiveinterrupt"
- set TESTPATH = $BASE/$TESTDIR
- $LSCMD $CERT $BASE | grep $TESTDIR | grep -q $TESTDIR
- if ($? != 0) then
- echo
- echo "create 1000 directories in testrecursiveinterrupt directory prior to runing test"
- $MKDIRCMD $CERT $TESTPATH || echo " [FAIL]" && exit -1
- $CHMODCMD $CERT o-r $TESTPATH || echo " [FAIL]" && exit -1
- $CHMODCMD $CERT g-r $TESTPATH || echo " [FAIL]" && exit -1
- foreach dir (`seq 1000`)
- $MKDIRCMD $CERT $TESTPATH/"dir"$dir || echo " [FAIL]" && exit -1
- end
- endif
- echo -n " vchmod"
- set logFile = "/tmp/vchmod-$TIMESTAMP.log"
- rm $logFile >& /dev/null
- echo $CHMODCMD $CERT -d -R g+r $TESTPATH $GROUP1
- $CHMODCMD $CERT -d -R g+r $TESTPATH $GROUP1 >& $logFile&
- give vchmod command time to start
- set chmodPID = $!
- set jobURL = `grep "nodeprops/" $logFile | head -n 1 | awk '{print $NF}'`
- while ($jobURL == "")
- echo "Sleep for 3s..."
- sleep 3
- set jobURL = `grep "nodeprops/" $logFile | head -n 1 | awk '{print $NF}'`
- end
- echo $jobURL
- kill -s INT $chmodPID
- # give kill a chance to complete
- sleep 2
- #rm $logFile >& /dev/null
- #verify job has been aborted
- #TODO to be implemented in Python
- #set phase = `$CHECKJOB $CERT $jobURL`
- #if $phase != 'ABORTED' then
- #echo " [FAIL]" && exit -1
- #else
- echo " [OK]"
- #endif
- endif
+# echo -n "interrupt recursive vchmod"
+#
+# set TESTDIR = "testrecursiveinterrupt"
+# set TESTPATH = $BASE/$TESTDIR
+# $LSCMD $CERT $BASE | grep $TESTDIR | grep -q $TESTDIR
+# if ($? != 0) then
+# echo
+# echo "create 1000 directories in testrecursiveinterrupt directory prior to runing test"
+# $MKDIRCMD $CERT $TESTPATH || echo " [FAIL]" && exit -1
+# $CHMODCMD $CERT o-r $TESTPATH || echo " [FAIL]" && exit -1
+# $CHMODCMD $CERT g-r $TESTPATH || echo " [FAIL]" && exit -1
+# foreach dir (`seq 1000`)
+# $MKDIRCMD $CERT $TESTPATH/"dir"$dir || echo " [FAIL]" && exit -1
+# end
+# endif
+# echo -n " vchmod"
+# set logFile = "/tmp/vchmod-$TIMESTAMP.log"
+# rm $logFile >& /dev/null
+# echo $CHMODCMD $CERT -d -R g+r $TESTPATH $GROUP
+# $CHMODCMD $CERT -d -R g+r $TESTPATH $GROUP >& $logFile&
+# give vchmod command time to start
+# set chmodPID = $!
+# set jobURL = `grep "nodeprops/" $logFile | head -n 1 | awk '{print $NF}'`
+# while ($jobURL == "")
+# echo "Sleep for 3s..."
+# sleep 3
+# set jobURL = `grep "nodeprops/" $logFile | head -n 1 | awk '{print $NF}'`
+# end
+# echo $jobURL
+# kill -s INT $chmodPID
+# # give kill a chance to complete
+# sleep 2
+# #rm $logFile >& /dev/null
+# #verify job has been aborted
+# #TODO to be implemented in Python
+# #set phase = `$CHECKJOB $CERT $jobURL`
+# #if $phase != 'ABORTED' then
+# #echo " [FAIL]" && exit -1
+# #else
+# echo " [OK]"
+# #endif
#cleanup
- $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $RMCMD -R $CERT $CONTAINER || echo " [FAIL]" && exit -1
echo
echo "*** test sequence passed for resource $resource ***"
end
diff --git a/vos/test/scripts/vospace-read-permission-atest.tcsh b/vos/test/scripts/vospace-read-permission-atest.tcsh
index 41a911aa6..81c801924 100755
--- a/vos/test/scripts/vospace-read-permission-atest.tcsh
+++ b/vos/test/scripts/vospace-read-permission-atest.tcsh
@@ -9,9 +9,10 @@ else
echo "WebService URL (VOSPACE_WEBSERVICE env variable): $VOSPACE_WEBSERVICE"
endif
+set CADC_TESTCERT_PATH = "/Users/adriand/A/test-certificates"
if (! ${?CADC_TESTCERT_PATH} ) then
echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of test cert files"
- exit -1
+ exit -1
else
echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
endif
@@ -26,16 +27,17 @@ endif
echo
-set LSCMD = "vls -l"
-set MKDIRCMD = "vmkdir"
-set RMCMD = "vrm"
-set CPCMD = "vcp"
-set RMDIRCMD = "vrmdir"
-set MVCMD = "vmv"
-set CHMODCMD = "vchmod"
+set LSCMD = "vls -l -k"
+set MKDIRCMD = "vmkdir -k"
+set RMCMD = "vrm -k"
+set CPCMD = "vcp -k"
+set RMDIRCMD = "vrmdir -k"
+set MVCMD = "vmv -k"
+set CHMODCMD = "vchmod -k"
+set VTAGCMD = "vtag -k"
-set CERT = "--cert=$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
+set CERT = "--cert=$CADC_TESTCERT_PATH/cadcproxy.pem"
set CERT1 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest1.pem"
set CERT2 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest2.pem"
@@ -49,22 +51,27 @@ set GROUP2 = "CADC_TEST_GROUP2"
foreach resource ($resources)
echo "************* TESTING AGAINST $resource ****************"
- # vault uses CADCRegtest1, cavern uses home/cadcregtest1
echo $resource | grep "cavern" >& /dev/null
if ( $status == 0) then
- set HOME_BASE = "home/cadcregtest1"
- set VOROOT = "arc:"
+ set VOROOT = "cavern:"
set TESTING_CAVERN = "true"
else
set VOROOT = "vos:"
- set HOME_BASE = "CADCRegtest1"
endif
- set VOHOME = "$VOROOT""$HOME_BASE"
- set BASE = "$VOHOME/atest"
+ set HOME_BASE = "vostools-inttest"
+ set VOHOME = "$VOROOT""$HOME_BASE"
+ set BASE = $VOHOME
- set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
- set CONTAINER = $BASE/$TIMESTAMP
+# echo -n ", creating base URI"
+# $RMCMD -R $BASE > /dev/null
+# $MKDIRCMD $BASE || echo " [FAIL]" && exit -1
+# $VTAGCMD $BASE 'ivo://cadc.nrc.ca/vospace/core#inheritPermissions=true'
+# $CHMODCMD o+w $BASE
+# echo " [OK]"
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
echo -n "** checking base URI"
$LSCMD $CERT $BASE > /dev/null
@@ -140,7 +147,7 @@ foreach resource ($resources)
echo " [OK]"
echo -n "delete test container (allowed)"
- $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $RMCMD $CERT -R $CONTAINER || echo " [FAIL]" && exit -1
echo -n " verify "
$LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
echo " [OK]"
@@ -165,7 +172,7 @@ foreach resource ($resources)
endif
echo -n "cleanup"
- $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $RMCMD $CERT -R $CONTAINER || echo " [FAIL]" && exit -1
echo -n " verify "
$LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
echo " [OK] "
@@ -187,7 +194,7 @@ foreach resource ($resources)
echo " [OK] "
echo -n "cleanup"
- $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $RMCMD $CERT -R $CONTAINER || echo " [FAIL]" && exit -1
echo -n " verify "
$LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
echo " [OK] "
@@ -213,7 +220,7 @@ foreach resource ($resources)
endif
echo -n "cleanup"
- $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $RMCMD $CERT -R $CONTAINER || echo " [FAIL]" && exit -1
echo -n " verify "
$LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
echo " [OK] "
@@ -235,7 +242,7 @@ foreach resource ($resources)
echo " [OK] "
echo -n "cleanup"
- $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $RMCMD $CERT -R $CONTAINER || echo " [FAIL]" && exit -1
echo -n " verify "
$LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
echo " [OK] "
@@ -256,7 +263,7 @@ foreach resource ($resources)
echo " [OK]"
echo -n "cleanup"
- $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $RMCMD $CERT -R $CONTAINER || echo " [FAIL]" && exit -1
echo -n " verify "
$LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
echo " [OK] "
diff --git a/vos/test/scripts/vospace-vsync-atest.tcsh b/vos/test/scripts/vospace-vsync-atest.tcsh
index 8a13ec728..8ddff8b57 100755
--- a/vos/test/scripts/vospace-vsync-atest.tcsh
+++ b/vos/test/scripts/vospace-vsync-atest.tcsh
@@ -10,10 +10,12 @@ else
endif
if (! ${?CADC_TESTCERT_PATH} ) then
- echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of test cert files"
- exit -1
+ echo "Missing CADC_TESTCERT_PATH location to cadc-auth.pem and cadc-auth-test.pem files"
+ exit -1
else
echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+ set CERT = "--cert=$CADC_TESTCERT_PATH/cadc-auth.pem"
+ set CERT1 = "--cert=$CADC_TESTCERT_PATH/cadc-auth-test.pem"
endif
if($#argv == 0) then
@@ -26,52 +28,46 @@ endif
echo
-set LSCMD = "vls"
-set MKDIRCMD = "vmkdir"
-set RMCMD = "vrm"
-set CHMODCMD = "vchmod"
-set VSYNCCMD = "vsync"
+set LSCMD = "vls -k"
+set MKDIRCMD = "vmkdir -k"
+set RMCMD = "vrm -k"
+set CHMODCMD = "vchmod -k"
+set VSYNCCMD = "vsync -k"
+set VTAGCMD = "vtag -k"
set TEST_DIR = vsync_test
set ABS_TEST_DIR = /tmp/$TEST_DIR
-set CERT = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest1.pem"
-
foreach resource ($resources)
echo "************* TESTING AGAINST $resource ****************"
- # vault uses CADCRegtest1, cavern uses home/cadcregtest1
echo $resource | grep "cavern" >& /dev/null
if ( $status == 0) then
- set HOME_BASE = "home/cadcauthtest1"
- set VOROOT = "arc:"
+ set VOROOT = "cavern:"
set TESTING_CAVERN = "true"
else
set VOROOT = "vos:"
- set HOME_BASE = "CADCAuthtest1"
endif
+ set HOME_BASE = "vostools-inttest"
set VOHOME = "$VOROOT""$HOME_BASE"
- set BASE = "$VOHOME/atest"
+ set BASE = $VOHOME
set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
set CONTAINER = $BASE/$TIMESTAMP
- echo -n "** checking base URI"
- $LSCMD $CERT $BASE > /dev/null
- if ( $status == 0) then
- echo " [OK]"
- else
- echo -n ", creating base URI"
- $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
- echo " [OK]"
- endif
-
- echo -n "** setting home and base to public"
+# echo "$RMCMD -R $CERT $BASE"1
+# echo -n "** checking base URI"
+# $RMCMD -R $CERT $BASE > /dev/null
+# echo -n ", creating base URI"
+# $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+# $VTAGCMD $CERT $BASE 'ivo://cadc.nrc.ca/vospace/core#inheritPermissions=true'
+# echo " [OK]"
+
+ echo -n "** setting home and base to public, no groups"
$CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
$CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
echo " [OK]"
- echo
echo "*** starting test sequence ***"
echo
diff --git a/vos/test/scripts_old/README b/vos/test/scripts_old/README
new file mode 100644
index 000000000..0f97b3f22
--- /dev/null
+++ b/vos/test/scripts_old/README
@@ -0,0 +1,7 @@
+This is a set of integration tests against the VOSpace service hosted
+at the CADC. These tests can only be executed at the CADC against that
+service. The vos package must be installed before the these tests
+are executed.
+
+Environment variables (optional):
+VOSPACE_WEBSERVICE = URL of the VOSpace service host (Default: "www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca")
diff --git a/vos/test/scripts_old/fuse_test_lockerrors.sh b/vos/test/scripts_old/fuse_test_lockerrors.sh
new file mode 100755
index 000000000..f3b0a45b1
--- /dev/null
+++ b/vos/test/scripts_old/fuse_test_lockerrors.sh
@@ -0,0 +1,129 @@
+#!/bin/bash
+
+export VOSPACE_WEBSERVICE="localhost"
+mounted_dir="/tmp/vospace"
+test_dir="${mounted_dir}/int_test"
+
+fusermount -u $mounted_dir
+
+../../scripts/mountvofs --vospace vos:CADCRegtest1 -v
+if [[ $? -ne 0 ]]
+then
+ echo "Could not mount vospace for CADCRegtest1"
+ exit 1
+fi
+
+ls -l ${test_dir}
+if [[ $? -ne 0 ]]
+then
+ echo "Could not list mounted vospace ${test_dir}"
+ exit 1
+fi
+
+cp test1.out ${test_dir}/test1.out
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "Copied to a locked file in ${test_dir}"
+ exit 1
+fi
+
+cp test1.out ${test_dir}/locked_dir
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}/locked_dir
+ echo "Copied to a locked directory in ${test_dir}/locked_dir"
+ exit 1
+fi
+
+cp test1.out ${test_dir}/locked_link_to_test1.out
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "Copied to a locked link, pointing to a locked file in ${test_dir}"
+ exit 1
+fi
+
+cp test1.out ${test_dir}/unlocked_link_to_test1.out
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "Copied to an unlocked link to a locked file in ${test_dir}"
+ exit 1
+fi
+
+rm ${test_dir}/test1.out
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "Removed a locked file in ${test_dir}."
+ exit 1
+fi
+
+rm ${test_dir}/locked_link_to_test1.out
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "Removed a locked link to a locked file in ${test_dir}."
+ exit 1
+fi
+
+mv ${test_dir}/test1.out ${test_dir}/test2.out
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "Moved a locked file to an unlocked file in ${test_dir}"
+ exit 1
+fi
+
+mv ${test_dir}/test2.out ${test_dir}/test1.out
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "Moved an unlocked file to a locked file in ${test_dir}"
+ exit 1
+fi
+
+mv ${test_dir}/test2.out ${test_dir}/locked_dir
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "Moved an unlocked file to a locked dir in ${test_dir}"
+ exit 1
+fi
+
+mv ${test_dir}/locked_link_to_test2.out ${test_dir}/test4.out
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "Moved a locked link file to an unlocked file in ${test_dir}"
+ exit 1
+fi
+
+mv ${test_dir}/test2.out ${test_dir}/locked_dir/test2.out
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "Moved an unlocked file to an unlocked file in a locked directory in ${test_dir}"
+ exit 1
+fi
+
+rmdir ${test_dir}/locked_dir
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "deleted a locked directory in ${test_dir}"
+ exit 1
+fi
+
+mkdir ${test_dir}/locked_dir/locked_dir2
+if [[ $? -eq 0 ]]
+then
+ ls -l ${test_dir}
+ echo "Created a directory in a locked directory in ${test_dir}"
+ exit 1
+fi
+
+
+date
+exit 0
diff --git a/vos/test/scripts_old/node.atest.xml b/vos/test/scripts_old/node.atest.xml
new file mode 100644
index 000000000..135943f10
--- /dev/null
+++ b/vos/test/scripts_old/node.atest.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/vos/test/scripts_old/setup_test_lockerrors_int.sh b/vos/test/scripts_old/setup_test_lockerrors_int.sh
new file mode 100644
index 000000000..f31de4d41
--- /dev/null
+++ b/vos/test/scripts_old/setup_test_lockerrors_int.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+export VOSPACE_WEBSERVICE='localhost'
+echo "This is a test file" > test1.out
+../../scripts/vlock --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test islocked false
+../../scripts/vrmdir --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test
+../../scripts/vmkdir --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test
+../../scripts/vcp test1.out --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/test1.out
+echo "This is more to the test file." >> test1.out
+../../scripts/vcp test1.out --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/test2.out
+echo "This is even more to the test file. In other words, make sure the md5 sums don't match." >> test1.out
+../../scripts/vcp test1.out --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/test3.out
+../../scripts/vmkdir --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/locked_dir
+../../scripts/vcp test1.out --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/locked_dir/test1.out
+../../scripts/vcp test1.out --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/locked_dir/test2.out
+../../scripts/vln --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/test1.out vos:CADCRegtest1/int_test/locked_link_to_test1.out
+../../scripts/vln --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/test1.out vos:CADCRegtest1/int_test/unlocked_link_to_test1.out
+../../scripts/vln --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/test2.out vos:CADCRegtest1/int_test/locked_link_to_test2.out
+../../scripts/vlock --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/test1.out islocked true
+../../scripts/vlock --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/locked_dir islocked true
+../../scripts/vlock --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/locked_link_to_test1.out islocked true
+../../scripts/vlock --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test/locked_link_to_test2.out islocked true
+../../scripts/vlock --cert=$A/test-certificates/x509_CADCRegtest1.pem vos:CADCRegtest1/int_test islocked true
diff --git a/vos/test/scripts_old/test_lockerrors_int.py b/vos/test/scripts_old/test_lockerrors_int.py
new file mode 100755
index 000000000..840d433f9
--- /dev/null
+++ b/vos/test/scripts_old/test_lockerrors_int.py
@@ -0,0 +1,224 @@
+# ***********************************************************************
+# ****************** CANADIAN ASTRONOMY DATA CENTRE *******************
+# ************* CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES **************
+#
+# (c) 2022. (c) 2022.
+# Government of Canada Gouvernement du Canada
+# National Research Council Conseil national de recherches
+# Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6
+# All rights reserved Tous droits réservés
+#
+# NRC disclaims any warranties, Le CNRC dénie toute garantie
+# expressed, implied, or énoncée, implicite ou légale,
+# statutory, of any kind with de quelque nature que ce
+# respect to the software, soit, concernant le logiciel,
+# including without limitation y compris sans restriction
+# any warranty of merchantability toute garantie de valeur
+# or fitness for a particular marchande ou de pertinence
+# purpose. NRC shall not be pour un usage particulier.
+# liable in any event for any Le CNRC ne pourra en aucun cas
+# damages, whether direct or être tenu responsable de tout
+# indirect, special or general, dommage, direct ou indirect,
+# consequential or incidental, particulier ou général,
+# arising from the use of the accessoire ou fortuit, résultant
+# software. Neither the name de l'utilisation du logiciel. Ni
+# of the National Research le nom du Conseil National de
+# Council of Canada nor the Recherches du Canada ni les noms
+# names of its contributors may de ses participants ne peuvent
+# be used to endorse or promote être utilisés pour approuver ou
+# products derived from this promouvoir les produits dérivés
+# software without specific prior de ce logiciel sans autorisation
+# written permission. préalable et particulière
+# par écrit.
+#
+# This file is part of the Ce fichier fait partie du projet
+# OpenCADC project. OpenCADC.
+#
+# OpenCADC is free software: OpenCADC est un logiciel libre ;
+# you can redistribute it and/or vous pouvez le redistribuer ou le
+# modify it under the terms of modifier suivant les termes de
+# the GNU Affero General Public la “GNU Affero General Public
+# License as published by the License” telle que publiée
+# Free Software Foundation, par la Free Software Foundation
+# either version 3 of the : soit la version 3 de cette
+# License, or (at your option) licence, soit (à votre gré)
+# any later version. toute version ultérieure.
+#
+# OpenCADC is distributed in the OpenCADC est distribué
+# hope that it will be useful, dans l’espoir qu’il vous
+# but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE
+# without even the implied GARANTIE : sans même la garantie
+# warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ
+# or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF
+# PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence
+# General Public License for Générale Publique GNU Affero
+# more details. pour plus de détails.
+#
+# You should have received Vous devriez avoir reçu une
+# a copy of the GNU Affero copie de la Licence Générale
+# General Public License along Publique GNU Affero avec
+# with OpenCADC. If not, see OpenCADC ; si ce n’est
+# . pas le cas, consultez :
+# .
+#
+# $Revision: 4 $
+#
+# ***********************************************************************
+#
+
+"""Integration test wrapped in unit test infrastructure.
+Expects vospace_ws to be running on localhost, and
+CADCRegtest1 vospace in database in DEVSYBASE.
+
+The commands to create the database content for this test
+are in the script setup_test_lockerrors_int.sh.
+"""
+
+import os
+import re
+import unittest
+from subprocess import Popen, PIPE, STDOUT
+
+class VCLITest(unittest.TestCase):
+ """
+ Base class for running v* scripts
+ """
+
+ def setUp(self):
+ # nothing to do for now
+ pass
+
+ def tearDown(self):
+ # nothing to do for now
+ pass
+
+ def run_cmd(self, args, print_output=False, use_debug=False, expected_errno=255, time_execution=False):
+ """
+ This method will run the script in a subprocess,
+ and pass it the given command line argument string.
+ """
+
+ self.use_debug = ''
+ if use_debug:
+ self.use_debug = '-d'
+
+ self.time_execution = ''
+ if time_execution:
+ self.time_execution = 'time '
+
+ cmd = '%s %s %s %s %s' %(self.time_execution, self.script_run, args, self.use_debug, self.test_cert_param)
+ if print_output:
+ print('Running [%s]' % cmd)
+
+ try:
+ p = Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
+ output = p.communicate()[0]
+ if print_output:
+ print(output)
+
+ self.assertEquals(p.returncode, expected_errno, 'got returncode %d, expected %d' % (p.returncode, expected_errno))
+ regex = re.search('NodeLocked', output)
+ self.assertTrue(regex != None, 'did not find "NodeLocked"' )
+
+ except Exception as e:
+ print('Error running [%s]' % cmd)
+ print(output)
+ self.fail(e)
+
+
+class VcmdTest(VCLITest):
+ """The execution of the commands under test should all fail
+ with NodeLocked errors."""
+
+ def setUp(self):
+ self.script_run = 'python'
+ self.test_vos = 'vos:CADCRegtest1/int_test'
+ self.test_cert_param = '--cert=$A/test-certificates/x509_CADCRegtest1.pem'
+ self.vcp_cmd = '../../scripts/vcp'
+ self.vrm_cmd = '../../scripts/vrm'
+ self.vsync_cmd = '../../scripts/vsync'
+ self.vrmdir_cmd = '../../scripts/vrmdir'
+ self.vmv_cmd = '../../scripts/vmv'
+
+ def test_vcp_locked_data_node_dest(self):
+ self.run_cmd('%s test1.out %s/test1.out' % (self.vcp_cmd, self.test_vos), expected_errno=1)
+
+ def test_vcp_locked_container_node_dest(self):
+ self.run_cmd('%s test1.out %s/locked_dir' % (self.vcp_cmd, self.test_vos), expected_errno=1)
+
+ def test_vcp_locked_link_node_locked_data_node_dest(self):
+ self.run_cmd('%s test1.out %s/locked_link_to_test1.out' % (self.vcp_cmd, self.test_vos), expected_errno=1)
+
+ def test_vcp_unlocked_link_node_locked_data_node_dest(self):
+ self.run_cmd('%s test1.out %s/unlocked_link_to_test1.out' % (self.vcp_cmd, self.test_vos), expected_errno=1)
+
+ def test_vrm_locked_data_node_dest(self):
+ self.run_cmd('%s %s/test1.out' % (self.vrm_cmd, self.test_vos), expected_errno=167)
+
+ def test_vrm_locked_link_node_dest(self):
+ self.run_cmd('%s %s/locked_link_to_test1.out' % (self.vrm_cmd, self.test_vos), expected_errno=167)
+
+ def test_vrmdir_locked_container_node_dest(self):
+ self.run_cmd('%s %s/locked_dir' % (self.vrmdir_cmd, self.test_vos))
+
+ def test_vmv_locked_source_data_node(self):
+ self.run_cmd('%s %s/test1.out %s/test2.out' % (self.vmv_cmd, self.test_vos, self.test_vos))
+
+ def test_vmv_locked_dest_data_node(self):
+ self.run_cmd('%s %s/test2.out %s/test1.out' % (self.vmv_cmd, self.test_vos, self.test_vos))
+
+ def test_vmv_locked_dest_container_node(self):
+ self.run_cmd('%s %s/test2.out %s/locked_dir' % (self.vmv_cmd, self.test_vos, self.test_vos))
+
+ def test_vmv_locked_source_link_node(self):
+ self.run_cmd('%s %s/locked_link_to_test2.out %s/test4.out' % (self.vmv_cmd, self.test_vos, self.test_vos))
+
+ def test_vmv_locked_dest_parent_container_node(self):
+ self.run_cmd('%s %s/test2.out %s/locked_dir/test2.out' % (self.vmv_cmd, self.test_vos, self.test_vos))
+
+ def test_vsync_locked_dest_data_node(self):
+ self.run_cmd('%s test1.out %s/test1.out' % (self.vsync_cmd, self.test_vos), expected_errno=0)
+
+ def test_vsync_locked_dest_container_node(self):
+ self.run_cmd('%s test1.out %s/locked_dir' % (self.vsync_cmd, self.test_vos), expected_errno=0)
+
+ def test_vsync_locked_dest_container_node(self):
+ self.run_cmd('%s test1.out %s/locked_dir' % (self.vsync_cmd, self.test_vos), expected_errno=0)
+
+ def test_vsync_locked_dest_parent_container_node(self):
+ self.run_cmd('%s test1.out %s/locked_dir/test2.out' % (self.vsync_cmd, self.test_vos), expected_errno=0)
+
+#class FcmdTest(VcmdTest):
+#
+# def setUp(self):
+# self.script_run = ''
+# self.test_vos = '/tmp/vospace/int_test'
+# self.test_cert_param = ''
+# self.vcp_cmd = 'cp'
+
+if __name__ == '__main__':
+ os.environ['VOSPACE_WEBSERVICE'] = 'localhost'
+ #os.environ['VOSPACE_WEBSERVICE'] = 'mach277.cadc.dao.nrc.ca'
+
+# # fuse test set-up
+# try:
+# # precautionary unmount
+# p = Popen('fusermount -u /tmp/vospace', shell=True, stdout=PIPE, stderr=STDOUT)
+# (output,returncode) = p.communicate()
+# except Exception, e:
+# # mostly, ignore errors
+# print output
+# print p.returncode
+# print str(e)
+#
+# try:
+# p = Popen('../../scripts/mountvofs --vospace vos:CADCRegtest1 -d', shell=True, stdout=PIPE, stderr=STDOUT)
+# (output,returncode) = p.communicate()
+# except Exception, e:
+# print output
+# print p.returncode
+# print str(e)
+# import sys
+# sys.exit(-1)
+
+ unittest.main()
diff --git a/vos/test/scripts_old/vospace-all.tcsh b/vos/test/scripts_old/vospace-all.tcsh
new file mode 100755
index 000000000..cb825b783
--- /dev/null
+++ b/vos/test/scripts_old/vospace-all.tcsh
@@ -0,0 +1,39 @@
+#!/bin/tcsh -f
+
+set THIS_DIR = `dirname $0`
+set THIS_DIR = `cd $THIS_DIR && pwd`
+
+echo "Enter path to the CADC test certificates"
+echo -n "Cert path: "
+set certpath = "$<"
+setenv CADC_TESTCERT_PATH ${certpath}
+
+echo "cert files path: $CADC_TESTCERT_PATH"
+echo
+echo "*** start all tests ***"
+echo "vospace-client-atest.tcsh"
+set args = ($argv)
+$THIS_DIR/vospace-client-atest.tcsh $args || echo "FAIL vospace-client-atest.tcsh" && exit -1
+echo "vospace-move-atest.tcsh"
+$THIS_DIR/vospace-move-atest.tcsh $args || echo "FAIL vospace-move-atest.tcsh" && exit -1
+echo "vospace-delete-permission-atest.tcsh"
+$THIS_DIR/vospace-delete-permission-atest.tcsh $args || echo "FAIL vospace-delete-permission-atest.tcsh" && exit -1
+echo "vospace-vsync-atest.tcsh"
+$THIS_DIR/vospace-vsync-atest.tcsh $args || echo "FAIL vospace-vsync-atest.tcsh" && exit -1
+echo "vospace-quota-atest.tcsh"
+$THIS_DIR/vospace-quota-atest.tcsh $args || echo "FAIL vospace-quota-atest.tcsh" && exit -1
+echo "vospace-link-atest.tcsh"
+$THIS_DIR/vospace-link-atest.tcsh $args || echo "FAIL vospace-link-atest.tcsh" && exit -1
+echo "vospace-read-permission-atest.tcsh"
+$THIS_DIR/vospace-read-permission-atest.tcsh $args || echo "FAIL vospace-read-permission-atest.tcsh" && exit -1
+echo "vospace-node-properties.tcsh"
+$THIS_DIR/vospace-node-properties.tcsh $args || echo "FAIL vospace-node-properties.tcsh" && exit -1
+echo "vospace-lock-atest.tcsh"
+$THIS_DIR/vospace-lock-atest.tcsh $args || echo "FAIL vospace-lock-atest.tcsh" && exit -1
+#echo "vospace-cookie-atest.tcsh"
+#$THIS_DIR/vospace-token-atest.tcsh $args || echo "FAIL vospace-cookie-atest.tcsh" && exit -1
+
+echo
+echo "*** all test sequences passed ***"
+
+date
diff --git a/vos/test/scripts_old/vospace-client-atest.tcsh b/vos/test/scripts_old/vospace-client-atest.tcsh
new file mode 100755
index 000000000..7902374c1
--- /dev/null
+++ b/vos/test/scripts_old/vospace-client-atest.tcsh
@@ -0,0 +1,271 @@
+#!/bin/tcsh -f
+
+date
+echo "###################"
+set THIS_DIR = `dirname $0`
+set THIS_DIR = `cd $THIS_DIR && pwd`
+
+if (! ${?VOSPACE_WEBSERVICE} ) then
+ echo "VOSPACE_WEBSERVICE env variable not set, use default WebService URL"
+else
+ echo "WebService URL (VOSPACE_WEBSERVICE env variable): $VOSPACE_WEBSERVICE"
+endif
+
+if (! ${?CADC_TESTCERT_PATH} ) then
+ echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of x509_CADCRegtest1.pem cert file"
+ exit -1
+else
+ set CERTFILE = "$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
+ echo "cert file: (CADC_TESTCERT_PATH env variable): $CERTFILE"
+endif
+
+if (! ${?TMPDIR} ) then
+ echo "TMPDIR env variable not set, using /tmp"
+ set TMPDIR = "/tmp"
+else
+ echo "Using ${TMPDIR} for temporary files"
+endif
+
+set LSCMD = "vls -l"
+set MKDIRCMD = "vmkdir"
+set RMCMD = "vrm"
+set CPCMD = "vcp"
+set RMDIRCMD = "vrmdir"
+set CHMODCMD = "vchmod"
+
+set CERT = " --cert=$CERTFILE"
+
+echo "vls command: " $LSCMD $CERT
+echo
+
+if($#argv == 0) then
+ set resources = "vault cavern"
+ echo "Testing against default resources: $resources"
+else
+ set resources = ($argv)
+ echo "Testing against resources: $resources"
+endif
+
+foreach resource ($resources)
+ echo "************* TESTING AGAINST $resource ****************"
+
+ # use resourceID in vos-config to determine the base URI
+ # vault uses CADCRegtest1, cavern uses home/cadcregtest1
+ echo $resource | grep "cavern" >& /dev/null
+ if ( $status == 0) then
+ set VOROOT = "arc:"
+ set HOME_BASE = "home/cadcregtest1"
+ set TESTING_CAVERN = "true"
+ else
+ set VOROOT = "vos:"
+ set HOME_BASE = "CADCRegtest1"
+ endif
+ set VOHOME = "$VOROOT""$HOME_BASE"
+ set BASE = "$VOHOME/atest"
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
+
+
+ echo -n "** checking base URI"
+ $LSCMD $CERT $BASE > /dev/null
+ if ( $status == 0) then
+ echo " [OK]"
+ else
+ echo -n ", creating base URI"
+ exit
+ $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+ echo -n "** setting home and base to public, no groups"
+ $CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
+ echo -n " [OK]"
+ $CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo
+ echo "*** starting test sequence ***"
+ echo
+ echo "** test container: ${CONTAINER}"
+ echo
+
+ echo -n "view vospace root container "
+ #$LSCMD $CERT $VOROOT > /dev/null || echo " [FAIL]" && exit -1
+ #echo " [OK]"
+ echo "[SKIP]"
+
+ echo -n "view non-existent node "
+ $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create private container "
+ $MKDIRCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "view created container "
+ $LSCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "verify public=false after create "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, permission inheitance not supported]"
+ else
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'drw----r--' || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "check set permission properties "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, permission inheitance not supported]"
+ else
+ $CHMODCMD $CERT g+rw $CONTAINER test:g1 test:g2 || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'drw-rw-r--' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'test:g1' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'test:g2' || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "check inherit permission properties "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, permission inheitance not supported]"
+ else
+ $MKDIRCMD $CERT $CONTAINER/pub || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep pub | grep -q 'drw-rw-r--' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep pub | grep -q 'test:g1' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep pub | grep -q 'test:g2' || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "check inherit + change certain properties "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, permission inheitance not supported]"
+ else
+ $MKDIRCMD $CERT $CONTAINER/priv || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT g+r $CONTAINER/priv test:g3 || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep priv | grep -q 'drw-rw-r--' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep priv | grep -q 'test:g3' || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep priv | grep -q 'test:g2' || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "check recursive create (non-existant parents) "
+ #$MKDIRCMD $CERT $CONTAINER/foo/bar/baz >& /dev/null || echo " [FAIL]" && exit -1
+ #$LSCMD $CERT $CONTAINER/foo/bar/baz >& /dev/null # || echo " [FAIL]" TODO add -p option&& exit -1
+ echo "[TODO]"
+
+ echo -n "copy file to existing container and non-existent data node "
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/something.png || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "copy empty files"
+ rm -f /tmp/zerosize.txt
+ touch /tmp/zerosize.txt
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null || echo " [FAIL]" && exit -1
+ # repeat
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null || echo " [FAIL]" && exit -1
+ # change size
+ echo "test" > /tmp/zerosize.txt
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null && echo " [FAIL]" && exit -1
+ # repeat
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null && echo " [FAIL]" && exit -1
+ # make it back 0 size
+ /bin/cp /dev/null /tmp/zerosize.txt
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null || echo " [FAIL]" && exit -1
+ # repeat
+ $CPCMD $CERT /tmp/zerosize.txt $CONTAINER || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/zerosize.txt | awk '{print $5}'| grep "0" >& /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+
+
+ echo -n "view existing data node "
+ $LSCMD $CERT $CONTAINER/something.png > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "copy data node to local filesystem "
+ $CPCMD $CERT $CONTAINER/something.png $THIS_DIR/something.png.2 || echo " [FAIL]" && exit -1
+ cmp $THIS_DIR/something.png $THIS_DIR/something.png.2 || echo " [FAIL]" && exit -1
+ \rm -f $THIS_DIR/something.png.2
+ echo " [OK]"
+
+ echo -n "Check quick copy"
+ $CPCMD $CERT --quick $THIS_DIR/something.png $CONTAINER/something.png.3|| echo " [FAIL]" && exit -1
+ $CPCMD $CERT --quick $CONTAINER/something.png.3 $THIS_DIR/something.png.3 || echo " [FAIL]" && exit -1
+ cmp $THIS_DIR/something.png $THIS_DIR/something.png.3 || echo " [FAIL]" && exit -1
+ \rm -f $THIS_DIR/something.png.3
+ echo " [OK]"
+
+ echo -n "Check pattern matched copy"
+ $CPCMD $CERT "$CONTAINER/something*" $TMPDIR || echo " [FAIL]" && exit -1
+ $MKDIRCMD $CERT $CONTAINER/pattern_dest
+ $CPCMD $CERT $THIS_DIR/something* $CONTAINER/pattern_dest || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "Check pattern with cutout"
+ $CPCMD $CERT "$BASE/test*.fits[1:10,1:10]" $TMPDIR || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "Do a real cutout of a known file"
+ #$CPCMD $CERT "vos:CADCRegtest1/DONOTDELETE_VOSPACE_CUTOUT_TEST.fits(34.436194,19.34665,0.01)" $TMPDIR/testcutout || echo " [FAIL]" && exit -1
+ #if (`cat $TMPDIR/testcutout | md5` != "cb7d6a829277975d1016a769970ec45a") then
+ # echo " [FAIL]" && exit -1
+ #endif
+ #\rm -f $TMPDIR/testcutout
+ #echo "[OK]"
+ echo "[SKIP]"
+
+ $CPCMD $CERT $CONTAINER/something.png $THIS_DIR/something.png.2 || echo " [FAIL]" && exit -1
+
+ echo -n "copy/overwrite existing data node "
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/something.png || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "set content-type during copy "
+ #$CMD $CERT --copy --src=$THIS_DIR/something.png --dest=$CONTAINER/something2.png --content-type=image/png || echo " [FAIL]" && exit -1
+ #$CMD $CERT --view --target=$CONTAINER/something2.png | grep -q 'type: image/png' || echo " [FAIL]" && exit -1
+ echo " [TODO]"
+
+ echo -n "set content-type during copy/overwrite "
+ #$CMD $CERT --copy --src=$THIS_DIR/something.png --dest=$CONTAINER/something.png --content-type=JUNK || echo " [FAIL]" && exit -1
+ #$CMD $CERT --view --target=$CONTAINER/something.png | grep -q 'type: JUNK' || echo " [FAIL]" && exit -1
+ echo " [TODO]"
+
+ echo -n "set content-type of existing data node "
+ #$CMD $CERT --set --target=$CONTAINER/something.png --content-type=image/png || echo " [FAIL]" && exit -1
+ #$CMD $CERT --view --target=$CONTAINER/something.png | grep -q 'type: image/png' || echo " [FAIL]" && exit -1
+ echo " [TODO]"
+
+ echo -n "delete existing data node "
+ $RMCMD $CERT $CONTAINER/something.png >& /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "view deleted/non-existent data node "
+ $LSCMD $CERT $CONTAINER/something.png >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "delete non-existent data node "
+ $RMCMD $CERT $CONTAINER/something.png >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "delete non-empty container "
+ $RMDIRCMD $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/something2.png >& /dev/null && echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "delete empty container "
+ $MKDIRCMD $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+ $RMDIRCMD $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo
+ echo "*** test sequence passed for resource $resource ***"
+end
+
+echo "*** ALL test sequences passed ***"
+date
diff --git a/vos/test/scripts_old/vospace-delete-permission-atest.tcsh b/vos/test/scripts_old/vospace-delete-permission-atest.tcsh
new file mode 100755
index 000000000..6e24f1b8b
--- /dev/null
+++ b/vos/test/scripts_old/vospace-delete-permission-atest.tcsh
@@ -0,0 +1,171 @@
+#!/bin/tcsh -f
+set THIS_DIR = `dirname $0`
+set THIS_DIR = `cd $THIS_DIR && pwd`
+
+
+if (! ${?VOSPACE_WEBSERVICE} ) then
+ echo "VOSPACE_WEBSERVICE env variable not set, use default WebService URL"
+else
+ echo "WebService URL (VOSPACE_WEBSERVICE env variable): $VOSPACE_WEBSERVICE"
+endif
+
+if (! ${?CADC_TESTCERT_PATH} ) then
+ echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of test cert files"
+ exit -1
+else
+ echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+endif
+
+if($#argv == 0) then
+ set resources = "vault cavern"
+ echo "Testing against default resources: $resources"
+else
+ set resources = ($argv)
+ echo "Testing against resources: $resources"
+endif
+
+set CHMODCMD = "vchmod"
+set MKDIRCMD = "vmkdir"
+set LSCMD = "vls -l"
+set CPCMD = "vcp"
+set RMDIRCMD = "vrmdir"
+
+set CERT = "--cert=$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
+set CERT1 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest1.pem"
+set CERT2 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest2.pem"
+
+echo "vchmod command: " $CHMODCMD $CERT
+echo "vchmod command 1: " $CHMODCMD $CERT1
+echo "vchmod command 2: " $CHMODCMD $CERT2
+
+echo
+
+# group 3000 aka CADC_TEST_GROUP1 has members: CADCAuthtest1
+set GROUP1 = "CADC_TEST_GROUP1"
+
+# group 3100 aka CADC_TEST_GROUP2 has members: CADCAuthtest1, CADCAuthtest2
+set GROUP2 = "CADC_TEST_GROUP2"
+
+foreach resource ($resources)
+ echo "************* TESTING AGAINST $resource ****************"
+
+ # vault uses CADCRegtest1, cavern uses home/cadcregtest1
+ echo $resource | grep "cavern" >& /dev/null
+ if ( $status == 0) then
+ set HOME_BASE = "home/cadcregtest1"
+ set VOROOT = "arc:"
+ set TESTING_CAVERN = "true"
+ else
+ set VOROOT = "vos:"
+ set HOME_BASE = "CADCRegtest1"
+ endif
+
+ set VOHOME = "$VOROOT""$HOME_BASE"
+ set BASE = "$VOHOME/atest"
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
+
+ echo -n "** checking base URI"
+ $LSCMD $CERT $BASE > /dev/null
+ if ( $status == 0) then
+ echo " [OK]"
+ else
+ echo -n ", creating base URI"
+ $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "** setting home and base to public, no groups"
+ $CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
+ echo -n " [OK]"
+ $CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo
+ echo "*** starting test sequence ***"
+ echo
+ echo "** test container: ${CONTAINER}"
+ echo
+
+ echo -n "create container "
+ $MKDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o+r $CONTAINER || echo " [FAIL]" && exit 1
+ $CHMODCMD $CERT g+w $CONTAINER $GROUP2 || echo " [FAIL]" && exit -1
+
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create container/sub1 (inherit permissions) "
+ $MKDIRCMD $CERT $CONTAINER/sub1 || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/sub1 > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create container/sub1/sub2 (group-write=$GROUP1) "
+ $MKDIRCMD $CERT $CONTAINER/sub1/sub2 || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT g+w $CONTAINER/sub1/sub2 $GROUP1 || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/sub1/sub2 > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "put data node in sub2 "
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/sub1/sub2/something.png || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/sub1/sub2/something.png > /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, permission inheritance not supported]"
+ else
+ $LSCMD $CERT $CONTAINER/sub1/sub2/something.png | grep -q "$GROUP1" || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "test delete container/sub1 (denied)"
+ $RMDIRCMD $CERT2 $CONTAINER/sub1/sub2 >& /dev/null && echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/sub1/sub2/something.png > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test delete container/sub1 (allowed)"
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, permission inheritance not supported]"
+ else
+ $RMDIRCMD $CERT1 $CONTAINER/sub1 >& /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/sub1 >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+# start fresh
+
+ echo -n "create container/sub1 "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, permission inheritance not supported]"
+ else
+ $MKDIRCMD $CERT $CONTAINER/sub1 || echo " [FAIL]" && exit -1
+ endif
+ $CHMODCMD $CERT o-r $CONTAINER/sub1 || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT g+w $CONTAINER/sub1 $GROUP1 || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "put data node in container/sub1 (allowed) "
+ $CPCMD $CERT1 $THIS_DIR/something.png $CONTAINER/sub1/something.png || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT1 $CONTAINER/sub1/something.png > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test root read "
+ $LSCMD $CERT $CONTAINER/sub1 > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test root delete"
+ $RMDIRCMD $CERT $CONTAINER/sub1 >& /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT1 $CONTAINER/sub1 >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo
+ echo "*** test sequence passed for resource $resource ***"
+end
+
+echo "*** ALL test sequence passed ***"
+date
diff --git a/vos/test/scripts_old/vospace-link-atest.tcsh b/vos/test/scripts_old/vospace-link-atest.tcsh
new file mode 100755
index 000000000..f0f793853
--- /dev/null
+++ b/vos/test/scripts_old/vospace-link-atest.tcsh
@@ -0,0 +1,193 @@
+#!/bin/tcsh -f
+
+set THIS_DIR = `dirname $0`
+set THIS_DIR = `cd $THIS_DIR && pwd`
+
+if (! ${?CADC_TESTCERT_PATH} ) then
+ echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of test cert files"
+ exit -1
+else
+ echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+endif
+
+if($#argv == 0) then
+ set resources = "vault cavern"
+ echo "Testing against default resources: $resources"
+else
+ set resources = ($argv)
+ echo "Testing against resources: $resources"
+endif
+
+date
+
+set LSCMD = "vls"
+set MKDIRCMD = "vmkdir"
+set RMCMD = "vrm"
+set CPCMD = "vcp"
+set RMDIRCMD = "vrmdir"
+set LNCMD = "vln"
+set CHMODCMD = "vchmod"
+
+set CERT = " --cert=$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
+set CERT2 = " --cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest1.pem"
+
+echo "command: " $LNCMD $CERT
+echo
+
+foreach resource ($resources)
+ echo "************* TESTING AGAINST $resource ****************"
+
+ # vault uses CADCRegtest1, cavern uses home/cadcregtest1
+ echo $resource | grep "cavern" >& /dev/null
+ if ( $status == 0) then
+ set HOME_BASE = "home/cadcregtest1"
+ set VOROOT = "arc:"
+ set TESTING_CAVERN = "true"
+ else
+ set VOROOT = "vos:"
+ set HOME_BASE = "CADCRegtest1"
+ endif
+
+ set VOHOME = "$VOROOT""$HOME_BASE"
+ set BASE = "$VOHOME/atest"
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
+
+ echo -n "** checking base URI"
+ $LSCMD -v $CERT $BASE >& /dev/null
+ if ( $status == 0) then
+ echo " [OK]"
+ else
+ echo -n ", creating base URI"
+ $MKDIRCMD $CERT $BASE >& /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+ echo -n "** setting home and base to public, no groups"
+ $CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+
+ echo "*** starting test sequence ***"
+ echo
+
+ echo -n "create base container"
+ $MKDIRCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o-r $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create container to be valid link target"
+ $MKDIRCMD $CERT $CONTAINER/target > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "copy file to target container"
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/target/something.png || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create link to target container"
+ $LNCMD $CERT $CONTAINER/target $CONTAINER/clink >& /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "list container"
+ # content displayed unless -l and no / at the end
+ # content displayed
+ $LSCMD $CERT $CONTAINER/clink | grep -q something || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/clink/ | grep -q something || echo " [FAIL]" && exit -1
+ $LSCMD $CERT -l $CONTAINER/clink/ | grep -q something || echo " [FAIL]" && exit -1
+ # case where the content of the target is not displayed just the link
+ $LSCMD $CERT -l $CONTAINER/clink | grep 'clink ->' | grep -q target || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+
+ echo -n "follow the link to get the file"
+ $CPCMD $CERT $CONTAINER/clink/something.png /tmp || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "follow the link without read permission and fail"
+ $CPCMD $CERT2 $CONTAINER/clink/something.png /tmp >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create link to target file"
+ $LNCMD $CERT $CONTAINER/target/something.png $CONTAINER/dlink >& /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "follow the link to get the file"
+ $CPCMD $CERT $CONTAINER/dlink /tmp || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create link to external vos URI"
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/83]"
+ else
+ $RMCMD $CERT $CONTAINER/e1link >& /dev/null
+ $LNCMD $CERT vos://cadc.nrc.ca~arc/unknown $CONTAINER/e1link >& /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "follow the invalid link and fail"
+ $CPCMD $CERT $CONTAINER/e1link/somefile /tmp >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create link to unknown scheme in URI"
+ #TODO not sure why this is not working anymore
+ #$LNCMD $CERT unknown://cadc.nrc.ca~vault/CADCRegtest1 $CONTAINER/e2link >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [SKIPPED - TODO]"
+
+ echo -n "follow the invalid link and fail"
+ $CPCMD $CERT $CONTAINER/e2link/somefile /tmp >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create link to external http URI"
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/83]"
+ else
+ $LNCMD $CERT https://www.google.ca $CONTAINER/e3link > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "copy external link"
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/83]"
+ else
+ rm -f /tmp/e3link
+ $CPCMD $CERT -L $CONTAINER/e3link /tmp/ >& /dev/null || echo " [FAIL]" && exit -1
+ grep -q google /tmp/e3link || echo " [FAIL]" && exit -1
+ rm -f /tmp/e3link
+ echo " [OK]"
+ endif
+
+
+ echo -n "Follow the invalid link and fail"
+ $CPCMD $CERT $CONTAINER/e3link/somefile /tmp >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "copy file to target through link"
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/83]"
+ else
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/clink/something2.png || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "Get the file through the link"
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/83]"
+ else
+ $CPCMD $CERT $CONTAINER/clink/something2.png /tmp || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "Get the file through the target"
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/83]"
+ else
+ $CPCMD $CERT $CONTAINER/target/something2.png /tmp || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+ echo
+ echo "*** test sequence passed for resource $resource ***"
+end
+
+echo "*** DONE test sequence passed ***"
+date
diff --git a/vos/test/scripts_old/vospace-lock-atest.tcsh b/vos/test/scripts_old/vospace-lock-atest.tcsh
new file mode 100755
index 000000000..37c0318ff
--- /dev/null
+++ b/vos/test/scripts_old/vospace-lock-atest.tcsh
@@ -0,0 +1,269 @@
+#!/bin/tcsh -f
+
+date
+set THIS_DIR = `dirname $0`
+set THIS_DIR = `cd $THIS_DIR && pwd`
+
+if (! ${?VOSPACE_WEBSERVICE} ) then
+ echo "VOSPACE_WEBSERVICE env variable not set, use default WebService URL"
+else
+ echo "WebService URL (VOSPACE_WEBSERVICE env variable): $VOSPACE_WEBSERVICE"
+endif
+if (! ${?CADC_TESTCERT_PATH} ) then
+ echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of x509_CADCRegtest1.pem cert file"
+ exit -1
+else
+ set CERTFILE = "$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
+ echo "cert file: ($CADC_TESTCERT_PATH env variable): $CERTFILE"
+endif
+
+if($#argv == 0) then
+ set resources = "vault cavern"
+ echo "Testing against default resources: $resources"
+else
+ set resources = ($argv)
+ echo "Testing against resources: $resources"
+endif
+
+set LSCMD = "vls -l"
+set MKDIRCMD = "vmkdir"
+set RMCMD = "vrm"
+set CPCMD = "vcp"
+
+set MVCMD = "vmv"
+set RMDIRCMD = "vrmdir"
+set CHMODCMD = "vchmod"
+set TAGCMD = "vtag"
+set LNCMD = "vln"
+set LOCKCMD = "vlock"
+
+set CERT = " --cert=$CERTFILE"
+
+set SUCCESS = "false"
+set LIST_ARGS = "ivo://cadc.nrc.ca/vospace/core#islocked"
+set VLOCK_ARGS = "--lock"
+set VUNLOCK_ARGS = "--unlock"
+
+echo "vls command: " $LSCMD $CERT
+echo
+
+foreach resource ($resources)
+ echo "************* TESTING AGAINST $resource ****************"
+
+ # vault uses CADCRegtest1, cavern uses home/cadcregtest1
+ echo $resource | grep "cavern" >& /dev/null
+ if ( $status == 0) then
+ set HOME_BASE = "home/cadcregtest1"
+ set VOROOT = "arc:"
+ set TESTING_CAVERN = "true"
+ else
+ set VOROOT = "vos:"
+ set HOME_BASE = "CADCRegtest1"
+ endif
+ set VOHOME = "$VOROOT""$HOME_BASE"
+ set BASE = "$VOHOME/atest/locktest"
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
+
+
+ set TEMPCONTAINER = $BASE/$TIMESTAMP"-temp"
+
+
+ echo "test setup"
+ echo -n "** checking base URI "
+
+ $LSCMD $CERT $BASE > /dev/null
+ if ( $status == 0) then
+ echo " [OK]"
+ else
+ echo -n ", creating base URI"
+ exit
+ $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "** setting home to public, no groups "
+ $CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo -n "** setting base to public, no groups "
+ $CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo "** test container: ${CONTAINER}"
+ echo
+ echo "*** starting test sequence ***"
+ echo
+
+ echo "test case 1: "
+ echo -n "create container "
+ $MKDIRCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo -n "check unlocked container "
+ $TAGCMD $CERT $CONTAINER $LIST_ARGS | grep -q true || set SUCCESS = "true"
+
+ if ( ${SUCCESS} == "true" ) then
+ set SUCCESS = "false"
+ echo " [OK]"
+ else
+ echo " [FAIL]"
+ exit -1
+ endif
+
+ echo
+
+ echo "test case 2: "
+ echo -n "lock container "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/82]"
+ else
+ $LOCKCMD $CERT $CONTAINER $VLOCK_ARGS > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo -n "check container is locked $CONTAINER"
+ $TAGCMD $CERT $CONTAINER $LIST_ARGS | grep -q true || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo
+
+ echo "test case 3: "
+ echo -n "unlock container "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/82]"
+ else
+ $LOCKCMD $CERT $CONTAINER $VUNLOCK_ARGS > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo -n "check unlocked container "
+ $TAGCMD $CERT $CONTAINER $LIST_ARGS | grep -q None && set SUCCESS = "true"
+
+ if ( ${SUCCESS} == "true" ) then
+ set SUCCESS = "false"
+ echo " [OK]"
+ else
+ echo " [FAIL]"
+ exit -1
+ endif
+ endif
+
+ echo
+
+ echo "test case 4: "
+ echo -n "create link "
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/something.png > /dev/null || echo " [FAIL]" && exit -1
+ $LNCMD $CERT $CONTAINER/something.png $CONTAINER/target > /dev/null || echo " [FAIL]" && exit -1
+ $TAGCMD $CERT $CONTAINER/target $LIST_ARGS | grep -q true || set SUCCESS = "true"
+
+ if ( ${SUCCESS} == "true" ) then
+ set SUCCESS = "false"
+ echo " [OK]"
+ else
+ echo " [FAIL]"
+ exit -1
+ endif
+ echo
+
+ echo "test case 5: "
+ echo -n "lock link "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/82]"
+ else
+ $LOCKCMD $CERT $CONTAINER/target $VLOCK_ARGS > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo -n "check locked link "
+ $TAGCMD $CERT $CONTAINER/target $LIST_ARGS | grep -q true || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+ echo
+
+ echo "test case 6: "
+ echo -n "unlock link "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/82]"
+ else
+ $LOCKCMD $CERT $CONTAINER/target $VUNLOCK_ARGS> /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo -n "check unlocked link "
+ $TAGCMD $CERT $CONTAINER/target $LIST_ARGS | grep -q None && set SUCCESS = "true"
+
+ if ( ${SUCCESS} == "true" ) then
+ set SUCCESS = "false"
+ echo " [OK]"
+ else
+ echo " [FAIL]"
+ exit -1
+ endif
+ endif
+ echo
+
+ echo "test case 7: "
+ echo -n "check unlocked node "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/82]"
+ else
+ $TAGCMD $CERT $CONTAINER/something.png $LIST_ARGS
+ $TAGCMD $CERT $CONTAINER/something.png $LIST_ARGS | grep -q None && set SUCCESS = "true"
+ if ( ${SUCCESS} == "true" ) then
+ set SUCCESS = "false"
+ echo " [OK]"
+ else
+ echo " [FAIL]"
+ exit -1
+ endif
+ endif
+
+ echo
+
+ echo "test case 8: "
+ echo -n "lock node "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/82]"
+ else
+ $LOCKCMD $CERT $CONTAINER/something.png $VLOCK_ARGS > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo -n "check locked node "
+ $TAGCMD $CERT $CONTAINER/something.png $LIST_ARGS | grep -q true || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+ echo
+
+ echo "test case 9: "
+ echo -n "unlock node "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, vos/issues/82]"
+ else
+ $LOCKCMD $CERT $CONTAINER/something.png $VUNLOCK_ARGS> /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo -n "check unlocked node "
+ $TAGCMD $CERT $CONTAINER/something.png $LIST_ARGS | grep -q None && set SUCCESS = "true"
+ if ( ${SUCCESS} == "true" ) then
+ set SUCCESS = "false"
+ echo " [OK]"
+ else
+ echo " [FAIL]"
+ exit -1
+ endif
+ endif
+ echo
+
+ # clean up
+ echo "test clean up "
+ echo -n "delete local file "
+ rm -f $THIS_DIR/something1.png || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "delete non-empty container "
+
+ $RMDIRCMD $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
+ $TAGCMD $CERT $CONTAINER $LIST_ARGS >& /dev/null || set SUCCESS = "true"
+ if ( ${SUCCESS} == "true" ) then
+ set SUCCESS = "false"
+ echo " [OK]"
+ else
+ echo " [FAIL]"
+ exit -1
+ endif
+ echo
+ echo "*** test sequence passed for resource $resource ***"
+end
+
+echo "*** ALL test sequences passed ***"
+date
diff --git a/vos/test/scripts_old/vospace-move-atest.tcsh b/vos/test/scripts_old/vospace-move-atest.tcsh
new file mode 100755
index 000000000..098af63f3
--- /dev/null
+++ b/vos/test/scripts_old/vospace-move-atest.tcsh
@@ -0,0 +1,264 @@
+#!/bin/tcsh -f
+
+set THIS_DIR = `dirname $0`
+set THIS_DIR = `cd $THIS_DIR && pwd`
+
+if (! ${?VOSPACE_WEBSERVICE} ) then
+ echo "VOSPACE_WEBSERVICE env variable not set, use default WebService URL"
+else
+ echo "WebService URL (VOSPACE_WEBSERVICE env variable): $VOSPACE_WEBSERVICE"
+endif
+
+if (! ${?CADC_TESTCERT_PATH} ) then
+ echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of test cert files"
+ exit -1
+else
+ echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+endif
+
+if($#argv == 0) then
+ set resources = "vault cavern"
+ echo "Testing against default resources: $resources"
+else
+ set resources = ($argv)
+ echo "Testing against resources: $resources"
+endif
+
+
+set LSCMD = "vls"
+set MKDIRCMD = "vmkdir"
+set RMCMD = "vrm"
+set CPCMD = "vcp"
+set RMDIRCMD = "vrmdir"
+set MVCMD = "vmv"
+set CHMODCMD = "vchmod"
+
+
+set CERT = "--cert=$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
+set CERT1 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest1.pem"
+set CERT2 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest2.pem"
+
+# group 3000 aka CADC_TEST_GROUP1 has members: CADCAuthtest1
+set GROUP1 = "ivo://cadc.nrc.ca/gms#CADC_TEST_GROUP1"
+
+# group 3100 aka CADC_TEST_GROUP2 has members: CADCAuthtest1, CADCAuthtest2
+set GROUP2 = "ivo://cadc.nrc.ca/gms#CADC_TEST_GROUP2"
+
+foreach resource ($resources)
+ echo "************* TESTING AGAINST $resource ****************"
+
+ # vault uses CADCRegtest1, cavern uses home/cadcregtest1
+ echo $resource | grep "cavern" >& /dev/null
+ if ( $status == 0) then
+ set HOME_BASE = "home/cadcregtest1"
+ set VOROOT = "arc:"
+ set TESTING_CAVERN = "true"
+ else
+ set VOROOT = "vos:"
+ set HOME_BASE = "CADCRegtest1"
+ endif
+
+ set VOHOME = "$VOROOT$HOME_BASE"
+ set BASE = "$VOHOME/atest"
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
+
+ echo -n "** checking base URI"
+ $LSCMD $CERT $BASE > /dev/null
+ if ( $status == 0) then
+ echo " [OK]"
+ else
+ echo -n ", creating base URI"
+ $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "** setting home and base to public"
+ $CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo
+
+ echo "*** starting test sequence ***"
+ echo
+ echo "** test container: ${CONTAINER}"
+ echo
+
+ echo -n "setup: create container "
+ $MKDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o-r $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "setup: create container/a read-write to group 2"
+ $MKDIRCMD $CERT $CONTAINER/a || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "setup: create container/a/aa read-write to group 1"
+ $MKDIRCMD $CERT $CONTAINER/a/aa || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a/aa > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "setup: upload data node aaa to container/a/aa "
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/a/aa/aaa || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a/aa/aaa > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "setup: upload data node b to container "
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/b || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/b > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "setup: upload data node c to container read-write to group 2"
+ $MKDIRCMD $CERT $CONTAINER/c || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/c > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "setup: create container/d read-write to group 2"
+ $MKDIRCMD $CERT $CONTAINER/d || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/d > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "setup: create container/d read-write to group 1"
+ $MKDIRCMD $CERT $CONTAINER/e || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/e > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "check no write permission on source data node (fail)"
+ $MVCMD $CERT2 $CONTAINER/b $CONTAINER/d >& /dev/null && echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/b > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "check no recursive write permission on source container node (fail)"
+ $MVCMD $CERT2 $CONTAINER/a $CONTAINER/d >& /dev/null && echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "check no write permission on dest (fail)"
+ $MVCMD $CERT2 $CONTAINER/c $CONTAINER/e >& /dev/null && echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/c > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test dest a data node (fail)"
+ $MVCMD $CERT $CONTAINER/a $CONTAINER/b >& /dev/null && echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test circular move (fail)"
+ $MVCMD $CERT $CONTAINER/a $CONTAINER/a/aa >& /dev/null && echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test root move (fail)"
+ $MVCMD $CERT $BASE $CONTAINER/d >& /dev/null && echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test move container into container (pass)"
+ $RMDIRCMD $CERT $CONTAINER/d/a >& /dev/null
+ $MVCMD $CERT $CONTAINER/a $CONTAINER/d >& /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/d/a > /dev/null || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/d/a/aa > /dev/null || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/d/a/aa/aaa > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "setup: move container back"
+ $MVCMD $CERT $CONTAINER/d/a $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test move container with new name (pass)"
+ $MVCMD $CERT $CONTAINER/a $CONTAINER/d/x >& /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/d/x > /dev/null || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/d/x/aa > /dev/null || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/d/x/aa/aaa > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "setup: move container back"
+ $MVCMD $CERT $CONTAINER/d/x $CONTAINER/a >& /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test move file into container (pass)"
+ $MVCMD $CERT $CONTAINER/a/aa/aaa $CONTAINER/d >& /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/d/aaa > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test move file with new name"
+ $MVCMD $CERT $CONTAINER/d/aaa $CONTAINER/a/aa/bbb >& /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a/aa/bbb > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test rename file"
+ $MVCMD $CERT $CONTAINER/a/aa/bbb $CONTAINER/a/aa/aaa >& /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a/aa/aaa > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "rename file when destination exists (fail)"
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/a/aa/bbb || echo " [FAIL]" && exit -1
+ $MVCMD $CERT $CONTAINER/a/aa/aaa $CONTAINER/a/aa/bbb >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "move a vos container to local file system (fail)"
+ $MVCMD $CERT $CONTAINER/a notused.txt >& /dev/null && echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ #TODO not supported in vmv
+ echo -n "move a vos data node to local file system (pass)"
+ #echo "$MVCMD $CERT $CONTAINER/a/aa/aaa something2.png > /dev/null"
+ #$MVCMD $CERT $CONTAINER/a/aa/aaa something2.png > /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ #$LSCMD $CERT $CONTAINER/a/aa/aaa > /dev/null && echo " [FAIL]" && exit -1
+ echo " [TODO]"
+
+ echo -n "move a local directory to vos (fail)"
+ mkdir testdir
+ $MVCMD $CERT testdir $CONTAINER/a >& /dev/null && echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/a/testdir >& /dev/null && echo " [FAIL]" && exit -1
+ rmdir testdir
+ echo " [OK]"
+
+ #TODO not supported in vmv
+ echo -n "move a file to vos (success)"
+ #$MVCMD $CERT something2.png $CONTAINER/a/aa/aaa> /dev/null || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ #$LSCMD $CERT $CONTAINER/a/aa/aaa > /dev/null || echo " [FAIL]" && exit -1
+ echo " [TODO]"
+
+ echo -n "do a local file system move (fail--unsupported)"
+ cp -f $THIS_DIR/something.png $THIS_DIR/something2.png
+ $MVCMD $CERT $THIS_DIR/something2.png $THIS_DIR/something3.png >& /dev/null && echo " [FAIL]" && exit -1
+ rm $THIS_DIR/something2.png
+ echo " [OK]"
+ echo
+ echo "*** test sequence passed for resource $resource ***"
+end
+
+echo "*** ALL test sequences passed ***"
+date
diff --git a/vos/test/scripts_old/vospace-node-properties.tcsh b/vos/test/scripts_old/vospace-node-properties.tcsh
new file mode 100755
index 000000000..0c57de038
--- /dev/null
+++ b/vos/test/scripts_old/vospace-node-properties.tcsh
@@ -0,0 +1,231 @@
+#!/bin/tcsh -f
+set THIS_DIR = `dirname $0`
+set THIS_DIR = `cd $THIS_DIR && pwd`
+
+
+if (! ${?VOSPACE_WEBSERVICE} ) then
+ echo "VOSPACE_WEBSERVICE env variable not set, use default WebService URL"
+else
+ echo "WebService URL (VOSPACE_WEBSERVICE env variable): $VOSPACE_WEBSERVICE"
+endif
+
+if (! ${?CADC_TESTCERT_PATH} ) then
+ echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of x509_CADCRegtest1.pem cert file"
+ exit -1
+else
+ set CERTFILE = "$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
+ echo "cert file: ($CADC_TESTCERT_PATH env variable): $CERTFILE"
+endif
+
+if($#argv == 0) then
+ set resources = "vault cavern"
+ echo "Testing against default resources: $resources"
+else
+ set resources = ($argv)
+ echo "Testing against resources: $resources"
+endif
+
+
+set LSCMD = "vls -l"
+set MKDIRCMD = "vmkdir"
+set RMDIRCMD = "vrmdir"
+set CHMODCMD = "vchmod"
+
+
+set CERT = "--cert=$CERTFILE"
+
+
+echo
+
+# group 3000 aka CADC_TEST_GROUP1 has members: CADCAuthtest1
+set GROUP1 = "CADC_TEST_GROUP1"
+
+# group 3100 aka CADC_TEST_GROUP2 has members: CADCAuthtest1, CADCAuthtest2
+set GROUP2 = "CADC_TEST_GROUP2"
+
+foreach resource ($resources)
+ echo "************* TESTING AGAINST $resource ****************"
+
+ # vault uses CADCRegtest1, cavern uses home/cadcregtest1
+ echo $resource | grep "cavern" >& /dev/null
+ if ( $status == 0) then
+ set HOME_BASE = "home/cadcregtest1"
+ set VOROOT = "arc:"
+ set TESTING_CAVERN = "true"
+ else
+ set VOROOT = "vos:"
+ set HOME_BASE = "CADCRegtest1"
+ endif
+
+ set VOHOME = "$VOROOT""$HOME_BASE"
+ set BASE = "$VOHOME/atest"
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
+
+ echo -n "** checking base URI"
+ $LSCMD $CERT $BASE > /dev/null
+ if ( $status == 0) then
+ echo " [OK]"
+ else
+ echo -n ", creating base URI"
+ $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "** setting home and base to public"
+ $CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo
+
+ echo "*** starting test sequence ***"
+ echo
+ echo "test container: " $CONTAINER
+ echo
+
+ echo -n "create container (no permissions) "
+ $MKDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o-r $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT g-r $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q "drw-------" || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create a sub-container"
+ $MKDIRCMD $CERT $CONTAINER/aaa || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER | grep aaa | grep -q "drw-------" || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create a sub-sub-container"
+ $MKDIRCMD $CERT $CONTAINER/aaa/bbb || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/aaa | grep bbb | grep -q "drw-------" || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create anoter sub-container"
+ $MKDIRCMD $CERT $CONTAINER/ccc || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER | grep ccc | grep -q "drw-------" || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "test vchmod with recursive option"
+ if ( ${?TESTING_CAVERN} ) then
+ set ERROR = "`$CHMODCMD $CERT -R g+r $CONTAINER $GROUP1 |& cat`"
+ echo "$ERROR" | grep -q "Operation not supported"
+ if ( $status == 0 ) then
+ echo " [SKIPPED, recursive vchmod not supported]"
+ else
+ echo " [FAIL]" && exit -1
+ endif
+ else
+ $CHMODCMD $CERT -R g+r $CONTAINER $GROUP1 || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep aaa | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep ccc | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/aaa | grep bbb | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "test vchmod with multiple groups"
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, impromptu groups are not supported]"
+ else
+ set MULTIGROUP = "A B C"
+ $CHMODCMD $CERT -R g+r $CONTAINER/aaa "$MULTIGROUP" || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep aaa | grep "$MULTIGROUP" | grep -q "drw-r-----" || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+
+ echo -n "make a sub-container public"
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, impromptu groups are not supported]"
+ else
+ $CHMODCMD $CERT o+r $CONTAINER/aaa/bbb || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL1]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep aaa | grep "$MULTIGROUP" | grep -q "drw-r-----" || echo " [FAIL2]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep ccc | grep $GROUP1 | grep -q "drw-r-----" || echo " [FAIL3]" && exit -1
+ $LSCMD $CERT $CONTAINER/aaa | grep bbb | grep "$MULTIGROUP" | grep -q "drw-r--r--" || echo " [FAIL4]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "recursively make all directories public"
+ if ( ${?TESTING_CAVERN} ) then
+ set ERROR = "`$CHMODCMD $CERT -R o+r $CONTAINER |& cat`"
+ echo "$ERROR" | grep -q "Operation not supported"
+ if ( $status == 0 ) then
+ echo " [SKIPPED, recursive vchmod not supported]"
+ else
+ echo " [FAIL]" && exit -1
+ endif
+ else
+ $CHMODCMD $CERT -R o+r $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep $GROUP1 | grep -q "drw-r--r--" || echo " [FAIL1]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep aaa | grep "$MULTIGROUP" | grep -q "drw-r--r--" || echo " [FAIL2]" && exit -1
+ $LSCMD $CERT $CONTAINER | grep ccc | grep $GROUP1 | grep -q "drw-r--r--" || echo " [FAIL3]" && exit -1
+ $LSCMD $CERT $CONTAINER/aaa | grep bbb | grep "$MULTIGROUP" | grep -q "drw-r--r--" || echo " [FAIL4]" && exit -1
+ echo " [OK]"
+ endif
+
+ # test interupt
+ echo -n "interrupt recursive vchmod"
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, recursive vchmod not supported]"
+ else
+ set TESTDIR = "testrecursiveinterrupt"
+ set TESTPATH = $BASE/$TESTDIR
+ $LSCMD $CERT $BASE | grep $TESTDIR | grep -q $TESTDIR
+ if ($? != 0) then
+ echo
+ echo "create 1000 directories in testrecursiveinterrupt directory prior to runing test"
+ $MKDIRCMD $CERT $TESTPATH || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o-r $TESTPATH || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT g-r $TESTPATH || echo " [FAIL]" && exit -1
+ foreach dir (`seq 1000`)
+ $MKDIRCMD $CERT $TESTPATH/"dir"$dir || echo " [FAIL]" && exit -1
+ end
+ endif
+ echo -n " vchmod"
+ set logFile = "/tmp/vchmod-$TIMESTAMP.log"
+ rm $logFile >& /dev/null
+ echo $CHMODCMD $CERT -d -R g+r $TESTPATH $GROUP1
+ $CHMODCMD $CERT -d -R g+r $TESTPATH $GROUP1 >& $logFile&
+ give vchmod command time to start
+ set chmodPID = $!
+ set jobURL = `grep "nodeprops/" $logFile | head -n 1 | awk '{print $NF}'`
+ while ($jobURL == "")
+ echo "Sleep for 3s..."
+ sleep 3
+ set jobURL = `grep "nodeprops/" $logFile | head -n 1 | awk '{print $NF}'`
+ end
+ echo $jobURL
+ kill -s INT $chmodPID
+ # give kill a chance to complete
+ sleep 2
+ #rm $logFile >& /dev/null
+ #verify job has been aborted
+ #TODO to be implemented in Python
+ #set phase = `$CHECKJOB $CERT $jobURL`
+ #if $phase != 'ABORTED' then
+ #echo " [FAIL]" && exit -1
+ #else
+ echo " [OK]"
+ #endif
+ endif
+
+ #cleanup
+ $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ echo
+ echo "*** test sequence passed for resource $resource ***"
+end
+
+echo "*** DONE test sequences passed ***"
+
+date
diff --git a/vos/test/scripts_old/vospace-quota-atest.tcsh b/vos/test/scripts_old/vospace-quota-atest.tcsh
new file mode 100755
index 000000000..86da0b945
--- /dev/null
+++ b/vos/test/scripts_old/vospace-quota-atest.tcsh
@@ -0,0 +1,87 @@
+#!/bin/tcsh -f
+
+set THIS_DIR = `dirname $0`
+set THIS_DIR = `cd $THIS_DIR && pwd`
+
+if (! ${?VOSPACE_WEBSERVICE} ) then
+ echo "VOSPACE_WEBSERVICE env variable not set, use default WebService URL"
+else
+ echo "WebService URL (VOSPACE_WEBSERVICE env variable): $VOSPACE_WEBSERVICE"
+endif
+
+if (! ${?CADC_TESTCERT_PATH} ) then
+ echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of x509_CADCAuthtest2.pem cert file"
+ exit -1
+else
+ set CERTFILE = "$CADC_TESTCERT_PATH/x509_CADCAuthtest1.pem"
+ echo "cert file: ($CADC_TESTCERT_PATH env variable): $CERTFILE"
+endif
+
+if($#argv == 0) then
+ set resources = "vault cavern"
+ echo "Testing against default resources: $resources"
+else
+ set resources = ($argv)
+ echo "Testing against resources: $resources"
+endif
+
+set MKDIRCMD = "vmkdir"
+set CPCMD = "vcp"
+set LSCMD = "vls"
+set RMDIRCMD = "vrmdir"
+set CERT = "--cert=$CERTFILE"
+
+echo
+
+foreach resource ($resources)
+ echo "************* TESTING AGAINST $resource ****************"
+
+ # vault uses CADCRegtest1, cavern uses home/cadcregtest1
+ echo $resource | grep "cavern" >& /dev/null
+ if ( $status == 0) then
+ set HOME_BASE = "home/cadcauthtest1"
+ set VOROOT = "arc:"
+ set TESTING_CAVERN = "true"
+ else
+ set VOROOT = "vos:"
+ set HOME_BASE = "CADCAuthtest1"
+ endif
+
+ set VOHOME = "$VOROOT""$HOME_BASE"
+ set BASE = "$VOHOME/atest"
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
+
+
+ echo -n "** checking base URI"
+ $LSCMD -v $CERT $BASE > /dev/null
+ if ( $status == 0) then
+ echo " [OK]"
+ else
+ echo -n ", creating base URI"
+ $MKDIRCMD $CERT $BASE >& || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo "*** starting test sequence for $CONTAINER ***"
+
+ echo -n "Create container"
+ $MKDIRCMD $CERT $CONTAINER || (echo " [FAIL]" ; exit -1)
+ echo " [OK]"
+
+ echo -n "Upload data node in excess of quota (expect error)"
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/testdata.png | grep -qi "quota" && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+
+ echo -n "delete container "
+ $RMDIRCMD $CERT $CONTAINER >& /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo
+ echo "*** test sequence passed for resource $resource ***"
+end
+
+echo "*** ALL test sequences passed ***"
+
+date
diff --git a/vos/test/scripts_old/vospace-read-permission-atest.tcsh b/vos/test/scripts_old/vospace-read-permission-atest.tcsh
new file mode 100755
index 000000000..41a911aa6
--- /dev/null
+++ b/vos/test/scripts_old/vospace-read-permission-atest.tcsh
@@ -0,0 +1,269 @@
+#!/bin/tcsh -f
+
+set THIS_DIR = `dirname $0`
+set THIS_DIR = `cd $THIS_DIR && pwd`
+
+if (! ${?VOSPACE_WEBSERVICE} ) then
+ echo "VOSPACE_WEBSERVICE env variable not set, use default WebService URL"
+else
+ echo "WebService URL (VOSPACE_WEBSERVICE env variable): $VOSPACE_WEBSERVICE"
+endif
+
+if (! ${?CADC_TESTCERT_PATH} ) then
+ echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of test cert files"
+ exit -1
+else
+ echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+endif
+
+if($#argv == 0) then
+ set resources = "vault cavern"
+ echo "Testing against default resources: $resources"
+else
+ set resources = ($argv)
+ echo "Testing against resources: $resources"
+endif
+
+echo
+
+set LSCMD = "vls -l"
+set MKDIRCMD = "vmkdir"
+set RMCMD = "vrm"
+set CPCMD = "vcp"
+set RMDIRCMD = "vrmdir"
+set MVCMD = "vmv"
+set CHMODCMD = "vchmod"
+
+
+set CERT = "--cert=$CADC_TESTCERT_PATH/x509_CADCRegtest1.pem"
+set CERT1 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest1.pem"
+set CERT2 = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest2.pem"
+
+
+# group 3000 aka CADC_TEST_GROUP1 has members: CADCAuthtest1
+set GROUP1 = "CADC_TEST_GROUP1"
+
+# group 3100 aka CADC_TEST_GROUP2 has members: CADCAuthtest1, CADCAuthtest2
+set GROUP2 = "CADC_TEST_GROUP2"
+
+foreach resource ($resources)
+ echo "************* TESTING AGAINST $resource ****************"
+
+ # vault uses CADCRegtest1, cavern uses home/cadcregtest1
+ echo $resource | grep "cavern" >& /dev/null
+ if ( $status == 0) then
+ set HOME_BASE = "home/cadcregtest1"
+ set VOROOT = "arc:"
+ set TESTING_CAVERN = "true"
+ else
+ set VOROOT = "vos:"
+ set HOME_BASE = "CADCRegtest1"
+ endif
+
+ set VOHOME = "$VOROOT""$HOME_BASE"
+ set BASE = "$VOHOME/atest"
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
+
+ echo -n "** checking base URI"
+ $LSCMD $CERT $BASE > /dev/null
+ if ( $status == 0) then
+ echo " [OK]"
+ else
+ echo -n ", creating base URI"
+ $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "** setting home and base to public"
+ $CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo
+
+ echo "*** starting test sequence ***"
+ echo
+ echo "test container: " $CONTAINER
+ echo
+
+ echo -n "create container (no permissions) "
+ $MKDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o-r $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT g-rw $CONTAINER || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "copy file to existing container and non-existent data node "
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/something.png || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "testing read as CADCAuthtest1 (denied) "
+ $LSCMD $CERT1 $CONTAINER/something.png >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "set group-read of container and data node to $GROUP1 "
+ $CHMODCMD $CERT g+r $CONTAINER $GROUP1 || echo " [FAIL set container]" && exit -1
+ $CHMODCMD $CERT g+r $CONTAINER/something.png $GROUP1 || echo " [FAIL set data]" && exit -1
+ $LSCMD $CERT $CONTAINER/something.png | grep "\-rw-r-----" | grep -q "$GROUP1" || echo " [FAIL check container]" && exit -1
+ echo " [OK]"
+
+ echo -n "testing read as CADCAuthtest1 vs $GROUP1 (allowed) "
+ $LSCMD $CERT1 $CONTAINER/something.png > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "testing read as CADCAuthtest2 vs $GROUP1 (denied) "
+ $LSCMD $CERT2 $CONTAINER/something.png >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "set group-read of container to $GROUP2 "
+ $CHMODCMD $CERT g+r $CONTAINER $GROUP2 || echo " [FAIL set container]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep 'drw-r-----' | grep -q $GROUP2 || echo " [FAIL check container]" && exit -1
+ echo -n " set group-read of data to $GROUP2 "
+ $CHMODCMD $CERT g+r $CONTAINER/something.png $GROUP2 || echo " [FAIL set data]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/something.png | grep '\-rw-r-----' | grep -q $GROUP2 || echo " [FAIL check data]" && exit -1
+ echo " [OK]"
+
+ echo -n "testing read as CADCAuthtest1 vs $GROUP2 (allowed) "
+ $LSCMD $CERT1 $CONTAINER/something.png > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "testing read as CADCAuthtest2 vs $GROUP2 (allowed) "
+ $LSCMD $CERT2 $CONTAINER/something.png > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "delete test container as CADCAuthtest2 (denied) "
+ $RMDIRCMD $CERT2 $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "delete test container (allowed)"
+ $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ # start fresh
+
+ echo -n "create container with --public "
+ $MKDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o+r $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK] "
+
+ echo -n "copy file (inherit public) "
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/something.png || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, permissioin inheritance not supported] "
+ else
+ $LSCMD $CERT1 $CONTAINER/something.png | grep -q '\-rw----r--' || echo " [FAIL]" && exit -1
+ echo " [OK] "
+ endif
+
+ echo -n "cleanup"
+ $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK] "
+
+ # start fresh
+
+ echo -n "create container "
+ $MKDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o+r $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'drw----r--' || echo " [FAIL]" && exit -1
+ echo " [OK] "
+
+ echo -n "copy file with --public "
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/something.png || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o+r $CONTAINER/something.png || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/something.png | grep -q '\-rw----r--' || echo " [FAIL]" && exit -1
+ echo " [OK] "
+
+ echo -n "cleanup"
+ $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK] "
+
+ # starting fresh
+
+ echo -n "create container with --group-read=${GROUP1} "
+ $MKDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o-r $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT g+r $CONTAINER $GROUP1 || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP > /dev/null || grep -q 'drw-r-----' || echo " [FAIL]" && exit -1
+ echo " [OK] "
+
+ echo -n "copy file (inherit group-read) "
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/something.png || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ if ( ${?TESTING_CAVERN} ) then
+ echo " [SKIPPED, permissioin inheritance not supported] "
+ else
+ $LSCMD $CERT1 $CONTAINER/something.png | grep '\-rw-r-----' | grep -q $GROUP1 || echo " [FAIL]" && exit -1
+ echo " [OK] "
+ endif
+
+ echo -n "cleanup"
+ $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK] "
+
+ # start fresh
+
+ echo -n "create container "
+ $MKDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o-r $CONTAINER || echo " [FAIL CHMOD]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'drw-------' || echo " [FAIL]" && exit -1
+ echo " [OK] "
+
+ echo -n "copy file with --group-read "
+ $CPCMD $CERT $THIS_DIR/something.png $CONTAINER/something.png || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT g+r $CONTAINER/something.png $GROUP1 || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER/something.png | grep '\-rw-r-----' | grep -q $GROUP1 || echo " [FAIL]" && exit -1
+ echo " [OK] "
+
+ echo -n "cleanup"
+ $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK] "
+
+ # fresh start
+
+ echo -n "create container with --public=false "
+ $MKDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o-r $CONTAINER || echo " [FAIL CHMOD]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'drw-------' || echo " [FAIL]" && exit -1
+ echo " [OK] "
+
+ echo -n "try to set --public as CADCAuthtest1 (denied) "
+ $CHMODCMD $CERT1 o+r $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $BASE | grep $TIMESTAMP | grep -q 'drw-------' || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "cleanup"
+ $RMDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER >& /dev/null && echo " [FAIL]" && exit -1
+ echo " [OK] "
+ echo
+ echo "*** test sequence passed for resource $resource ***"
+end
+
+echo "*** ALL test sequences passed ***"
+
+date
diff --git a/vos/test/scripts_old/vospace-token-atest.tcsh b/vos/test/scripts_old/vospace-token-atest.tcsh
new file mode 100755
index 000000000..346c0257a
--- /dev/null
+++ b/vos/test/scripts_old/vospace-token-atest.tcsh
@@ -0,0 +1,122 @@
+#!/bin/tcsh -f
+
+set THIS_DIR = `dirname $0`
+set THIS_DIR = `cd $THIS_DIR && pwd`
+
+if (! ${?VOSPACE_WEBSERVICE} ) then
+ setenv VOSPACE_WEBSERVICE 'www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca'
+ echo "VOSPACE_WEBSERVICE env variable not #set, use default WebService URL $VOSPACE_WEBSERVICE"
+else
+ echo "WebService URL (VOSPACE_WEBSERVICE env variable): $VOSPACE_WEBSERVICE"
+endif
+
+if($#argv == 0) then
+ set resources = "vault cavern"
+ echo "Testing against default resources: $resources"
+else
+ set resources = ($argv)
+ echo "Testing against resources: $resources"
+endif
+
+set ACCESS_PAGE=https://ws-cadc.canfar.net/ac/login
+echo "Using access page: $ACCESS_PAGE"
+
+foreach resource ($resources)
+ echo "************* TESTING AGAINST $resource ****************"
+
+ # vault uses CADCRegtest1, cavern uses home/cadcregtest1
+ echo $resource | grep "cavern" >& /dev/null
+ if ( $status == 0) then
+ echo "** using cavern, scoped token not supported, skipping test"
+ else
+ set VOROOT = "vos:"
+
+ # Username / password for getting tokens
+ echo "Enter credentials for a VOSpace account in which we will perform tests."
+ echo -n "CADC Username: "
+ set username = $<
+ echo -n "Password: "
+ stty -echo
+ set password = $<
+ echo
+ stty echo
+
+
+ set LSCMD = "vls -l"
+ set MKDIRCMD = "vmkdir"
+ set RMCMD = "vrm"
+ set CPCMD = "vcp"
+ set RMDIRCMD = "vrmdir"
+ set CHMODCMD = "vchmod"
+ echo
+
+ set VOHOME = "$VOROOT$username"
+ # token needs the full URI
+ set VOHOME_TOKEN = "vos://cadc.nrc.ca~vault/$username"
+ set BASE = "$VOHOME/atest"
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
+
+ echo
+
+ echo "Test CONTAINER: $CONTAINER"
+
+ # Start with a token scoped to user's entire tree
+ set TOKEN = "`curl -s -d username=$username -d password=$password ${ACCESS_PAGE}'?'scope=${VOHOME_TOKEN}`"
+
+ echo -n "create containers"
+ $MKDIRCMD --token "$TOKEN" -p $CONTAINER/A > /dev/null || echo " [FAIL]" && exit -1
+ $MKDIRCMD --token "$TOKEN" $CONTAINER/B > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "set permissions"
+ $CHMODCMD --token="$TOKEN" o+r $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD --token="$TOKEN" o+r $CONTAINER/A || echo " [FAIL]" && exit -1
+ $CHMODCMD --token="$TOKEN" o+r $CONTAINER/B || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ # Get a new token scoped only to the /B subdir
+ set TOKEN = "`curl -s -d username=$username -d password=$password ${ACCESS_PAGE}'?'scope=${VOHOME_TOKEN}/atest/$TIMESTAMP/B`"
+
+ echo -n "copy file to unscoped tree fails"
+ $CPCMD --token="$TOKEN" $THIS_DIR/something.png $CONTAINER/A/ >& /dev/null
+ if ( $status == 0 ) then
+ echo " [FAIL]" && exit -1
+ endif
+ echo " [OK]"
+
+ echo -n "copy a file to scoped tree - Fails because service does not return the proper securityMethod (AD Nov 17 2020. Also see https://github.com/opencadc/vos/issues/88)"
+ $CPCMD --token="$TOKEN" $THIS_DIR/something.png $CONTAINER/B/ || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "check that the file got there"
+ $LSCMD --token="$TOKEN" $CONTAINER/B | grep -q 'something.png' || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "create sub container with file in it"
+ $MKDIRCMD --token="$TOKEN" $CONTAINER/B/test > /dev/null || echo " [FAIL]" && exit -1
+ $CPCMD --token="$TOKEN" $THIS_DIR/something.png $CONTAINER/B/test/ || echo " [FAIL]" && exit -1
+ $LSCMD --token="$TOKEN" $CONTAINER/B/test | grep -q 'something.png' || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "remove the file in the sub container"
+ $RMCMD --token="$TOKEN" $CONTAINER/B/test/something.png || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "remove the sub container"
+ $RMDIRCMD --token="$TOKEN" $CONTAINER/B/test || echo " [FAIL]" && exit -1
+ $LSCMD --token="$TOKEN" $CONTAINER/B | grep -q test
+ if ( $status == 0 ) then
+ echo " [FAIL]" && exit -1
+ endif
+ echo " [OK]"
+
+ echo
+ echo "*** test sequence passed for resource $resource ***"
+ endif
+end
+
+echo "*** ALL test sequences passed ***"
+
+date
diff --git a/vos/test/scripts_old/vospace-vsync-atest.tcsh b/vos/test/scripts_old/vospace-vsync-atest.tcsh
new file mode 100755
index 000000000..8a13ec728
--- /dev/null
+++ b/vos/test/scripts_old/vospace-vsync-atest.tcsh
@@ -0,0 +1,122 @@
+#!/bin/tcsh -f
+
+set THIS_DIR = `dirname $0`
+set THIS_DIR = `cd $THIS_DIR && pwd`
+
+if (! ${?VOSPACE_WEBSERVICE} ) then
+ echo "VOSPACE_WEBSERVICE env variable not set, use default WebService URL"
+else
+ echo "WebService URL (VOSPACE_WEBSERVICE env variable): $VOSPACE_WEBSERVICE"
+endif
+
+if (! ${?CADC_TESTCERT_PATH} ) then
+ echo "CADC_TESTCERT_PATH env variable not set. Must point to the location of test cert files"
+ exit -1
+else
+ echo "cert files path: ($CADC_TESTCERT_PATH env variable): $CADC_TESTCERT_PATH"
+endif
+
+if($#argv == 0) then
+ set resources = "vault cavern"
+ echo "Testing against default resources: $resources"
+else
+ set resources = ($argv)
+ echo "Testing against resources: $resources"
+endif
+
+echo
+
+set LSCMD = "vls"
+set MKDIRCMD = "vmkdir"
+set RMCMD = "vrm"
+set CHMODCMD = "vchmod"
+set VSYNCCMD = "vsync"
+
+set TEST_DIR = vsync_test
+set ABS_TEST_DIR = /tmp/$TEST_DIR
+
+set CERT = "--cert=$CADC_TESTCERT_PATH/x509_CADCAuthtest1.pem"
+
+foreach resource ($resources)
+ echo "************* TESTING AGAINST $resource ****************"
+
+ # vault uses CADCRegtest1, cavern uses home/cadcregtest1
+ echo $resource | grep "cavern" >& /dev/null
+ if ( $status == 0) then
+ set HOME_BASE = "home/cadcauthtest1"
+ set VOROOT = "arc:"
+ set TESTING_CAVERN = "true"
+ else
+ set VOROOT = "vos:"
+ set HOME_BASE = "CADCAuthtest1"
+ endif
+
+ set VOHOME = "$VOROOT""$HOME_BASE"
+ set BASE = "$VOHOME/atest"
+
+ set TIMESTAMP=`date +%Y-%m-%dT%H-%M-%S`
+ set CONTAINER = $BASE/$TIMESTAMP
+
+ echo -n "** checking base URI"
+ $LSCMD $CERT $BASE > /dev/null
+ if ( $status == 0) then
+ echo " [OK]"
+ else
+ echo -n ", creating base URI"
+ $MKDIRCMD $CERT $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ endif
+
+ echo -n "** setting home and base to public"
+ $CHMODCMD $CERT o+r $VOHOME || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o+r $BASE || echo " [FAIL]" && exit -1
+ echo " [OK]"
+ echo
+
+ echo "*** starting test sequence ***"
+ echo
+ echo "** test container: ${CONTAINER}"
+ echo
+
+ echo -n "setup: create container "
+ $MKDIRCMD $CERT $CONTAINER || echo " [FAIL]" && exit -1
+ $CHMODCMD $CERT o-r $CONTAINER || echo " [FAIL]" && exit -1
+ echo -n " verify "
+ $LSCMD $CERT $CONTAINER > /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+
+ echo -n "vsync a directory"
+ rm -fR $ABS_TEST_DIR >& /dev/null
+ mkdir $ABS_TEST_DIR
+ $VSYNCCMD $CERT $ABS_TEST_DIR $CONTAINER || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/$TEST_DIR || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+
+ echo -n "vsync a bunch of empty files"
+ touch $ABS_TEST_DIR/a.txt
+ touch $ABS_TEST_DIR/b.txt
+ touch $ABS_TEST_DIR/c.txt
+ touch $ABS_TEST_DIR/d.txt
+ $VSYNCCMD $CERT $ABS_TEST_DIR $CONTAINER || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/$TEST_DIR/a.txt >& /dev/null || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/$TEST_DIR/b.txt >& /dev/null || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/$TEST_DIR/c.txt >& /dev/null || echo " [FAIL]" && exit -1
+ $LSCMD $CERT $CONTAINER/$TEST_DIR/d.txt >& /dev/null || echo " [FAIL]" && exit -1
+ echo " [OK]"
+
+ echo -n "vsync a changed file"
+ echo "Test" > $ABS_TEST_DIR/a.txt
+ $VSYNCCMD $CERT $ABS_TEST_DIR $CONTAINER || echo " [FAIL]" && exit -1
+ $LSCMD -l $CERT $CONTAINER/$TEST_DIR/a.txt | awk '{if ($5 == 0){ print " [FAIL]"; exit -1}}'
+ $LSCMD -l $CERT $CONTAINER/$TEST_DIR/b.txt | awk '{if ($5 != 0){ print " [FAIL]"; exit -1}}'
+ $LSCMD -l $CERT $CONTAINER/$TEST_DIR/c.txt | awk '{if ($5 != 0){ print " [FAIL]"; exit -1}}'
+ $LSCMD -l $CERT $CONTAINER/$TEST_DIR/d.txt | awk '{if ($5 != 0){ print " [FAIL]"; exit -1}}'
+ echo " [OK]"
+ echo
+ echo "*** test sequence passed for resource $resource ***"
+end
+
+echo "*** ALL test sequence passed ***"
+date