forked from pressgang-ccms/PressGangCCMSREST
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webdav-extended-tests
executable file
·95 lines (79 loc) · 1.84 KB
/
webdav-extended-tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash
# These tests are designed to stress the WebDAV server by making hundreds of calls.
MOUNT_DIR="/mnt/pressgang/TOPICS"
# cp extended test 1
echo Starting cp extended test 1
for i in {0..9}
do
for j in {0..9}
do
cp "${MOUNT_DIR}/3/0/${i}/${j}/TOPIC30${i}${j}/30${i}${j}.xml" /tmp
diff "${MOUNT_DIR}/3/0/${i}/${j}/TOPIC30${i}${j}/30${i}${j}.xml" "/tmp/30${i}${j}.xml"
if [[ $? -ne 0 ]]
then
echo "************ cp extended test 1 failed ************"
break
fi
done
done
# mv extended test 1
echo Starting mv extended test 1
for i in {0..9}
do
for j in {0..9}
do
mv "${MOUNT_DIR}/3/0/${i}/${j}/TOPIC30${i}${j}/30${i}${j}.xml" /tmp
done
done
for i in {0..9}
do
for j in {0..9}
do
if [[ -f "${MOUNT_DIR}/3/0/${i}/${j}/TOPIC30${i}${j}/30${i}${j}.xml" ]]
then
echo "************ mv extended test 1 failed ************"
break
fi
done
done
# touch extended test 1
echo Starting touch extended test 1
for i in {0..9}
do
for j in {0..9}
do
if [[ -f "${MOUNT_DIR}/3/0/${i}/${j}/TOPIC30${i}${j}/30${i}${j}.xml" ]]
then
rm "${MOUNT_DIR}/3/0/${i}/${j}/TOPIC30${i}${j}/30${i}${j}.xml"
fi
done
done
for i in {0..9}
do
for j in {0..9}
do
touch "${MOUNT_DIR}/3/0/${i}/${j}/TOPIC30${i}${j}/30${i}${j}.xml"
done
done
for i in {0..9}
do
for j in {0..9}
do
if [[ ! -f "${MOUNT_DIR}/3/0/${i}/${j}/TOPIC30${i}${j}/30${i}${j}.xml" ]]
then
echo "************ touch extended test 1 failed ************"
break
fi
done
done
# tar extended test 1
echo Starting tar extended test 1
rm /tmp/filelist
for i in {0..9}
do
for j in {0..9}
do
echo "3/0/${i}/${j}/TOPIC30${i}${j}/30${i}${j}.xml" >> /tmp/filelist
done
done
tar -C "${MOUNT_DIR}" -cjf /tmp/tar1.tar.bz2 -T /tmp/filelist