diff options
author | Andrew Bartlett <abartlet@samba.org> | 2001-06-27 00:32:52 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2001-06-27 00:32:52 +0000 |
commit | d6ffe900c934655410fffc67387f16784ee6303e (patch) | |
tree | 1a335ed6c1ff654e4b11827fe6a69d8ea0186a96 /testsuite | |
parent | c2cfcb34e1fdef24ac7979bb0f77340d27fc6926 (diff) | |
download | samba-d6ffe900c934655410fffc67387f16784ee6303e.tar.gz |
Changed some of the tests around, made failures for parts actualy count
Andrew Bartlett
(This used to be commit 56a881b2b4957912055fdf053ef37ca2ea3606b8)
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/build_farm/basicsmb-listfilesauth.test | 22 | ||||
-rw-r--r-- | testsuite/build_farm/basicsmb-listfilesnpw.test | 22 | ||||
-rw-r--r-- | testsuite/build_farm/basicsmb-sharelist.test | 19 | ||||
-rw-r--r-- | testsuite/build_farm/basicsmb.smb.conf.template | 1 | ||||
-rw-r--r-- | testsuite/build_farm/basicsmb.test | 57 | ||||
-rw-r--r-- | testsuite/build_farm/runlist | 2 |
6 files changed, 65 insertions, 58 deletions
diff --git a/testsuite/build_farm/basicsmb-listfilesauth.test b/testsuite/build_farm/basicsmb-listfilesauth.test new file mode 100644 index 0000000000..4ec72fd2b9 --- /dev/null +++ b/testsuite/build_farm/basicsmb-listfilesauth.test @@ -0,0 +1,22 @@ +. basicsmb.fns + +test_listfilesauth() { + echo $prefix/bin/smbclient //localhost/samba -U$whoami%$password -c 'ls' + $prefix/bin/smbclient //localhost/samba -U$whoami%$password -c 'ls' + status=$? + if [ $status = 0 ]; then + echo "listed files OK" + else + echo "listing files with smbd failed with status $status" + return 1 + fi + return 0 +} + +password=samba + +(test_smb_conf_setup && test_smbpasswd) || exit 1 + +test_listfilesauth || exit 1 + + diff --git a/testsuite/build_farm/basicsmb-listfilesnpw.test b/testsuite/build_farm/basicsmb-listfilesnpw.test new file mode 100644 index 0000000000..a470b29b2e --- /dev/null +++ b/testsuite/build_farm/basicsmb-listfilesnpw.test @@ -0,0 +1,22 @@ +. basicsmb.fns + +test_listfilesnpw() { + echo $prefix/bin/smbclient //localhost/samba -U$whoami% -c 'ls' + $prefix/bin/smbclient //localhost/samba -U$whoami% -c 'ls' + status=$? + if [ $status = 0 ]; then + echo "smbd listed files in user level security with NO PASSWORD!" + return 1 + else + echo "listing files with smbd failed with status $status (correct)" + fi + return 0 +} + +password=samba + +(test_smb_conf_setup && test_smbpasswd) || exit 1 + +test_listfilesnpw || exit 1 + + diff --git a/testsuite/build_farm/basicsmb-sharelist.test b/testsuite/build_farm/basicsmb-sharelist.test new file mode 100644 index 0000000000..87c3e47552 --- /dev/null +++ b/testsuite/build_farm/basicsmb-sharelist.test @@ -0,0 +1,19 @@ +. basicsmb.fns +test_sharelist() { + echo $prefix/bin/smbclient -U$whoami% -L localhost + $prefix/bin/smbclient -U$whoami% -L localhost + status=$? + if [ $status = 0 ]; then + echo "smbd listed shares OK" + else + echo "listing shares with smbd failed with status $status" + return 1 + fi + return 0 +} + +(test_smb_conf_setup) || exit 1 + +test_sharelist || exit 1 + + diff --git a/testsuite/build_farm/basicsmb.smb.conf.template b/testsuite/build_farm/basicsmb.smb.conf.template index 3f33973eb9..627b019f3a 100644 --- a/testsuite/build_farm/basicsmb.smb.conf.template +++ b/testsuite/build_farm/basicsmb.smb.conf.template @@ -3,6 +3,7 @@ log level = 3 encrypt passwords = yes server string = Samba %v Build Farm Tests + name resolve order = lmhosts [test] path = PREFIX/testdir diff --git a/testsuite/build_farm/basicsmb.test b/testsuite/build_farm/basicsmb.test deleted file mode 100644 index 27808a434f..0000000000 --- a/testsuite/build_farm/basicsmb.test +++ /dev/null @@ -1,57 +0,0 @@ -test_smb_conf_setup() { - cat basicsmb.smb.conf.template | sed "s|PREFIX|$prefix|g" | sed "s|BUILD_FARM|$pwd|g" > $prefix/lib/smb.conf - echo "Setting up smb.conf:" - cat $prefix/lib/smb.conf - -} - -test_smbpasswd() { - ( echo $password ; echo $password; ) | $prefix/bin/smbpasswd -L -s -a $whoami - status=$? - if [ $status = 0 ]; then - echo "smbpasswd correctly set inital password ($password)" - else - echo "smbpasswd failed to set inital password ($password)!" - return 1 - fi - return 0 -} - -test_sharelist() { - if $prefix/bin/smbclient -U$whoami% -L $host; then - echo "smbd listed shares OK" - else - echo "listing shares with smbd failed with $?" - return 1 - fi - return 0 -} - -test_listfiles() { - if $prefix/bin/smbclient //$host/samba -U$whoami% -c 'ls'; then - echo "listed files OK" - else - echo "listing files with smbd failed with $?" - return 1 - fi - return 0 -} - -test_listfilesauth() { - if $prefix/bin/smbclient //$host/samba_2_2 -U$whoami%$password -c 'ls'; then - echo "listed files OK" - else - echo "listing files with smbd failed with $?" - return 1 - fi - return 0 -} - - -(test_smb_conf_setup && test_smbpasswd) || exit 1 - -test_sharelist -test_listfiles -test_listfilesauth - - diff --git a/testsuite/build_farm/runlist b/testsuite/build_farm/runlist index 5e9fe381ef..6a247e7565 100644 --- a/testsuite/build_farm/runlist +++ b/testsuite/build_farm/runlist @@ -1 +1 @@ -TEST_ALL="basicsmb" +TEST_ALL="basicsmb-sharelist basicsmb-listfilesauth basicsmb-listfilesnpw" |