source: tests/00780_quotas @ 105afb5

Last change on this file since 105afb5 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 3.4 KB
Line 
1#!/bin/bash
2
3source testlib || exit 1
4
5DESCRIPTION1="Ssh beschikbaar?"
6VERIFYEXIT=0
7sshtest || exit 1
8
9DESCRIPTION1="Sla test over indien we niet de juiste licentieoptie hebben."
10CMD="cat /etc/webint/REG"
11VERIFYPOSITIVE='"F"'
12if ! sshtest; then
13        echo "Dit is geen fileserver, test overgeslagen"
14        exit 0
15fi
16
17DESCRIPTION1="Activeer homedirs"
18PAGE="samba/sambasettings.php"
19IGNOREERROR=1
20METHOD="post"
21POSTBODY="store=1&new_homes=on";
22scc_add
23scc_test || exit 1
24
25
26./_maketestusers || exit 1
27
28DESCRIPTION1="Geeft testuser1 quota van 10mb"
29IGNOREERROR=1
30PAGE="samba/editquota.php?mode=users&name=testuser1"
31METHOD="post"
32POSTBODY="new_hqb=10&new_format=1&new_hqn=&editQuota=1"
33scc_add
34scc_test || exit 1
35
36DESCRIPTION1="9 mb uploaden mag nog net"
37CMD="dd if=/dev/zero bs=1000000 count=9 | smbclient //localhost/testuser1 -U testuser1 syn3 -c 'put - test'"
38VERIFYPOSITIVE="putting"
39VERIFYNEGATIVE="NT_"
40sshtest || exit 1
41
42DESCRIPTION1="11 mb is diskfull"
43CMD="dd if=/dev/zero bs=1000000 count=11 | smbclient //localhost/testuser1 -U testuser1 syn3 -c 'put - test'"
44VERIFYPOSITIVE="(Error writing|NT_STATUS_DISK_FULL)"
45sshtest || exit 1
46
47DESCRIPTION1="testuser1 quota weer uitzetten"
48IGNOREERROR=1
49PAGE="samba/editquota.php?mode=users&name=testuser1"
50METHOD="post"
51POSTBODY="new_hqb=&new_format=1&new_hqn=&editQuota=1"
52scc_add
53scc_test || exit 1
54
55DESCRIPTION1="11 mb schrijven mag dan gewoon weer"
56CMD="dd if=/dev/zero bs=1000000 count=11 | smbclient //localhost/testuser1 -U testuser1 syn3 -c 'put - test'"
57VERIFYNEGATIVE="NT_"
58VERIFYPOSITIVE="putting"
59sshtest || exit 1
60
61
62DESCRIPTION1="Geeft Domain Groups quota van 20mb"
63IGNOREERROR=1
64PAGE="samba/editquota.php?mode=groups&name=Domain Users"
65METHOD="post"
66POSTBODY="new_hqb=20&new_format=1&new_hqn=&editQuota=1"
67scc_add
68scc_test || exit 1
69
70DESCRIPTION1="20 mb schrijven testuser1 kan gewoon met groupquota van 20 mb"
71CMD="dd if=/dev/zero bs=1000000 count=20 | smbclient //localhost/testuser1 -U testuser1 syn3 -c 'put - test'"
72VERIFYNEGATIVE="NT_"
73VERIFYPOSITIVE="putting"
74sshtest || exit 1
75
76DESCRIPTION1="9 mb schrijven testuser1 kan gewoon met groupquota van 20 mb"
77CMD="dd if=/dev/zero bs=1000000 count=9 | smbclient //localhost/testuser1 -U testuser1 syn3 -c 'put - test'"
78VERIFYNEGATIVE="NT_"
79VERIFYPOSITIVE="putting"
80sshtest || exit 1
81
82DESCRIPTION1="9 mb schrijven testuser2 kan gewoon met groupquota van 20 mb"
83CMD="dd if=/dev/zero bs=1000000 count=9 | smbclient //localhost/testuser2 -U testuser2 syn3 -c 'put - test'"
84VERIFYNEGATIVE="NT_"
85VERIFYPOSITIVE="putting"
86sshtest || exit 1
87
88DESCRIPTION1="15 mb overschijd nu de groepquota, bij testuser1"
89CMD="dd if=/dev/zero bs=1000000 count=15 | smbclient //localhost/testuser1 -U testuser1 syn3 -c 'put - test'"
90VERIFYPOSITIVE="(Error writing|NT_STATUS_DISK_FULL)"
91sshtest || exit 1
92
93DESCRIPTION1="15 mb overschijd nu de groepquota, bij testuser2"
94CMD="dd if=/dev/zero bs=1000000 count=15 | smbclient //localhost/testuser2 -U testuser2 syn3 -c 'put - test'"
95VERIFYPOSITIVE="(Error writing|NT_STATUS_DISK_FULL)"
96sshtest || exit 1
97
98
99DESCRIPTION1="Domain users quota weer uit"
100IGNOREERROR=1
101PAGE="samba/editquota.php?mode=groups&name=Domain Users"
102METHOD="post"
103POSTBODY="new_hqb=&new_format=1&new_hqn=&editQuota=1"
104scc_add
105scc_test || exit 1
106
107DESCRIPTION1="25 mb mag nu gewoon weer"
108CMD="dd if=/dev/zero bs=1000000 count=25 | smbclient //localhost/testuser1 -U testuser1 syn3 -c 'put - test'"
109VERIFYNEGATIVE="NT_"
110VERIFYPOSITIVE="putting"
111sshtest || exit 1
112
Note: See TracBrowser for help on using the repository browser.