You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/integration/tests/sda/21_cancel_test.sh
+41Lines changed: 41 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,47 @@ if [ "$(psql -U postgres -h postgres -d sda -At -c "select event from sda.file_e
60
60
exit 1
61
61
fi
62
62
63
+
64
+
# check database to verify file archive location and path has been unset
65
+
if [ "$(psql -U postgres -h postgres -d sda -At -c "SELECT 1 FROM sda.files WHERE id = '$CORRID' AND archive_file_path = '' AND archive_location IS NULL")"!="1" ];then
66
+
echo"canceling file failed"
67
+
exit 1
68
+
fi
69
+
70
+
cat >/shared/direct <<EOD
71
+
[default]
72
+
access_key=access
73
+
secret_key=secretKey
74
+
check_ssl_certificate = False
75
+
check_ssl_hostname = False
76
+
encoding = UTF-8
77
+
encrypt = False
78
+
guess_mime_type = True
79
+
host_base = s3:9000
80
+
host_bucket = s3:9000
81
+
human_readable_sizes = false
82
+
multipart_chunk_size_mb = 50
83
+
use_https = False
84
+
socket_timeout = 30
85
+
EOD
86
+
87
+
# Verify that archived file is removed
88
+
result=$(s3cmd -c direct ls s3://archive1/test_dummy.org/"$CORRID")
89
+
if [ "$result"!="" ];then
90
+
echo"file with id $CORRID was not removed from archive"
91
+
exit 1
92
+
fi
93
+
result=$(s3cmd -c direct ls s3://archive2/test_dummy.org/"$CORRID")
94
+
if [ "$result"!="" ];then
95
+
echo"file with id $CORRID was not removed from archive"
96
+
exit 1
97
+
fi
98
+
result=$(s3cmd -c direct ls s3://backup1/test_dummy.org/"$CORRID")
99
+
if [ "$result"!="" ];then
100
+
echo"file with id $CORRID was not removed from backup"
0 commit comments