summaryrefslogtreecommitdiff
path: root/testdata/samba3/verify
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-31 16:51:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:36:17 -0500
commit0712cbdab4c397b9f74fcd681f40df9c9c2c59a8 (patch)
tree05a6e0151391ed749c6ea51c254747ac34c78a55 /testdata/samba3/verify
parent52bcf4c5a3a371e13530fe83c8b4ca06dad10b8f (diff)
downloadsamba-0712cbdab4c397b9f74fcd681f40df9c9c2c59a8.tar.gz
samba-0712cbdab4c397b9f74fcd681f40df9c9c2c59a8.tar.bz2
samba-0712cbdab4c397b9f74fcd681f40df9c9c2c59a8.zip
r9834: More tests for the upgrade from Samba3
(This used to be commit d2db164d6f674cada470e871c558c75f98244141)
Diffstat (limited to 'testdata/samba3/verify')
-rwxr-xr-xtestdata/samba3/verify51
1 files changed, 51 insertions, 0 deletions
diff --git a/testdata/samba3/verify b/testdata/samba3/verify
new file mode 100755
index 0000000000..ed6ed95189
--- /dev/null
+++ b/testdata/samba3/verify
@@ -0,0 +1,51 @@
+#!/usr/bin/env smbscript
+/* Verifies that the data present in this directory
+ Can be read correctly by Samba4. Do not update
+ without changing the corresponding TDB file!
+ Written by Jelmer Vernooij, 2005.
+ */
+
+libinclude("base.js");
+
+var path = substr(ARGV[0], 0, -strlen("verify"));
+printf("Reading from %s\n", path);
+
+var s = samba3_read(path, path+"smb.conf");
+assert(s != undefined);
+
+// smb.conf checks
+assert(s.configuration.get("passdb backend") != undefined);
+
+var data = s.configuration.data();
+assert(data != undefined);
+var global = data["global"];
+assert(global != undefined);
+assert(global["passdb backend"] == s.configuration.get("passdb backend"));
+assert(global["passdb backend"] != undefined);
+
+println("smb.conf ok");
+
+assert(s.winsentries.length == 22);
+assert(s.samaccounts.length == 3);
+assert(s.shares.length == 0);
+assert(s.registry.keys.length == 28);
+assert(s.groupmappings.length == 13);
+assert(s.aliases.length == 0);
+assert(s.idmapdb.mappings.length == 4);
+
+println("database entry count correct");
+
+// account policies
+assert(s.policy.min_password_length == 5);
+assert(s.policy.minimum_password_age == 0);
+assert(s.policy.maximum_password_age == 999999999);
+assert(s.policy.refuse_machine_password_change == 0);
+assert(s.policy.reset_count_minutes == 0);
+assert(s.policy.disconnect_time == -1);
+assert(s.policy.user_must_logon_to_change_password == 0);
+assert(s.policy.password_history == 0);
+assert(s.policy.lockout_duration == 0);
+assert(s.policy.bad_lockout_minutes == 0);
+
+println("account policies ok");
+