summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2008-05-03 01:50:20 +0200
committerMichael Adam <obnox@samba.org>2008-05-06 12:26:13 +0200
commit4cbb87adad09a0e9cfdd82d6aa794c5af91bb654 (patch)
treef913075ac6407471d865f25c29fcfb39fa3a9bc1
parent49264b539ddab90d03fb6a179b5a6ad302a5340a (diff)
downloadsamba-4cbb87adad09a0e9cfdd82d6aa794c5af91bb654.tar.gz
samba-4cbb87adad09a0e9cfdd82d6aa794c5af91bb654.tar.bz2
samba-4cbb87adad09a0e9cfdd82d6aa794c5af91bb654.zip
tests: Add a net_misc test.
(This used to be commit 026d701aff2c035359894786ec22b4ed829cfb31)
-rwxr-xr-xsource3/script/tests/test_net_misc.sh50
-rwxr-xr-xsource3/script/tests/test_net_s3.sh26
-rwxr-xr-xsource3/script/tests/tests_all.sh8
3 files changed, 80 insertions, 4 deletions
diff --git a/source3/script/tests/test_net_misc.sh b/source3/script/tests/test_net_misc.sh
new file mode 100755
index 0000000000..3ceb087885
--- /dev/null
+++ b/source3/script/tests/test_net_misc.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# various tests for the "net" command
+
+NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
+
+NETTIME="${NET} time"
+NETLOOKUP="${NET} lookup"
+
+incdir=`dirname $0`
+. $incdir/test_functions.sh
+
+failed=0
+
+test_time()
+{
+ PARAM="$1"
+
+ ${NETTIME} ${PARAM} -S localhost2
+}
+
+test_lookup()
+{
+ PARAM="$1"
+
+ ${NETLOOKUP} ${PARAM}
+}
+
+testit "get the time" \
+ test_time || \
+ failed=`expr $failed + 1`
+
+testit "get the system time" \
+ test_time system || \
+ failed=`expr $failed + 1`
+
+testit "get the tize zone" \
+ test_time zone || \
+ failed=`expr $failed + 1`
+
+testit "lookup the PDC" \
+ test_lookup pdc || \
+ failed=`expr $failed + 1`
+
+testit "lookup the master browser" \
+ test_lookup master || \
+ failed=`expr $failed + 1`
+
+testok $0 $failed
+
diff --git a/source3/script/tests/test_net_s3.sh b/source3/script/tests/test_net_s3.sh
new file mode 100755
index 0000000000..24732580fa
--- /dev/null
+++ b/source3/script/tests/test_net_s3.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# tests for the "net" command
+
+incdir=`dirname $0`
+. $incdir/test_functions.sh
+
+failed=0
+
+net_misc() {
+ echo "Running misc tests"
+ $SCRIPTDIR/test_net_misc.sh \
+ || failed=`expr $failed + $?`
+}
+
+net_registry() {
+ echo "Running registry tests"
+ $SCRIPTDIR/test_net_registry.sh \
+ || failed=`expr $failed + $?`
+}
+
+net_misc
+net_registry
+
+testok $0 $failed
+
diff --git a/source3/script/tests/tests_all.sh b/source3/script/tests/tests_all.sh
index 6e5334da31..cb545674e3 100755
--- a/source3/script/tests/tests_all.sh
+++ b/source3/script/tests/tests_all.sh
@@ -42,9 +42,9 @@ ntlm_auth_s3() {
|| failed=`expr $failed + $?`
}
-net_registry() {
- echo "RUNNING SUBTESTS net_registry"
- $SCRIPTDIR/test_net_registry.sh \
+net_s3() {
+ echo "RUNNING SUBTESTS net_s3"
+ $SCRIPTDIR/test_net_s3.sh \
|| failed=`expr $failed + $?`
}
@@ -72,7 +72,7 @@ if test "x$TESTS" = "x" ; then
smbclient_s3_encrypted
wbinfo_s3
ntlm_auth_s3
- net_registry
+ net_s3
posix_s3
else
for THIS_TEST in $TESTS; do