summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2021-04-14 11:44:51 +0200
committerAndrew Bartlett <abartlet@samba.org>2021-04-28 03:43:34 +0000
commitf291b8f157156024fe6726ddf16218529b39f5e9 (patch)
treeee7fdc4e5e72d5ffd2fdd7ee5d607086fd980bf6 /source4
parent86f7bc7a3722a95cb2c0e45255affb1520e581f9 (diff)
downloadsamba-f291b8f157156024fe6726ddf16218529b39f5e9.tar.gz
tests: Use --configfile instead of -s
We should use long options in tests to make clear what we are trying to do. Also the -s short option will be removed for --configfile later. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/setup/tests/blackbox_s3upgrade.sh10
-rwxr-xr-xsource4/setup/tests/blackbox_start_backup.sh2
-rwxr-xr-xsource4/setup/tests/blackbox_upgradeprovision.sh4
-rw-r--r--source4/torture/drs/python/ridalloc_exop.py4
-rw-r--r--source4/torture/drs/python/samba_tool_drs.py8
-rw-r--r--source4/torture/drs/python/samba_tool_drs_no_dns.py12
6 files changed, 20 insertions, 20 deletions
diff --git a/source4/setup/tests/blackbox_s3upgrade.sh b/source4/setup/tests/blackbox_s3upgrade.sh
index 840371a515b..3c0afe96744 100755
--- a/source4/setup/tests/blackbox_s3upgrade.sh
+++ b/source4/setup/tests/blackbox_s3upgrade.sh
@@ -40,7 +40,7 @@ cat - > $PREFIX/samba3-upgrade/samba3/smb1.conf <<EOF
EOF
testit "samba3-upgrade-member" $PYTHON $samba_tool domain classicupgrade $PREFIX/samba3-upgrade/samba3/smb1.conf --targetdir=$PREFIX/samba3-upgrade/s4_1 --dbdir=$PREFIX/samba3-upgrade/samba3 --use-ntvfs
-testit "samba3-upgrade-member-getlocalsid" $samba_net getlocalsid s3upgrade -s $PREFIX/samba3-upgrade/s4_1/etc/smb.conf
+testit "samba3-upgrade-member-getlocalsid" $samba_net getlocalsid s3upgrade --configfile=$PREFIX/samba3-upgrade/s4_1/etc/smb.conf
# Test 2 (s3 dc)
cat - > $PREFIX/samba3-upgrade/samba3/smb2.conf <<EOF
@@ -65,8 +65,8 @@ mv $PREFIX/samba3-upgrade/samba3/wins.dat2 $PREFIX/samba3-upgrade/samba3/wins.da
# Upgrade NT4-like domains in samba3upgrade
testit "samba3-upgrade-dc" $PYTHON $samba_tool domain classicupgrade $PREFIX/samba3-upgrade/samba3/smb2.conf --targetdir=$PREFIX/samba3-upgrade/s4_2 --dbdir=$PREFIX/samba3-upgrade/samba3 --use-ntvfs
-testit "samba3-upgrade-dc-getlocalsid" $samba_net getlocalsid samba -s $PREFIX/samba3-upgrade/s4_2/etc/smb.conf
-testit "samba3-upgrade-dc-getdomainsid" $samba_net getdomainsid -s $PREFIX/samba3-upgrade/s4_2/etc/smb.conf
+testit "samba3-upgrade-dc-getlocalsid" $samba_net getlocalsid samba --configfile=$PREFIX/samba3-upgrade/s4_2/etc/smb.conf
+testit "samba3-upgrade-dc-getdomainsid" $samba_net getdomainsid --configfile=$PREFIX/samba3-upgrade/s4_2/etc/smb.conf
#Run final test without a wins.dat
rm -f $PREFIX/samba3-upgrade/samba3/wins.dat
@@ -91,8 +91,8 @@ cat - > $PREFIX/samba3-upgrade/samba3/smb3.conf <<EOF
EOF
testit "samba3-upgrade-testparm" $PYTHON $samba_tool domain classicupgrade $PREFIX/samba3-upgrade/samba3/smb2.conf --targetdir=$PREFIX/samba3-upgrade/s4_3 --testparm=$testparm --use-ntvfs
-testit "samba3-upgrade-testparm-getlocalsid" $samba_net getlocalsid samba -s $PREFIX/samba3-upgrade/s4_3/etc/smb.conf
-testit "samba3-upgrade-testparm-getdomainsid" $samba_net getdomainsid -s $PREFIX/samba3-upgrade/s4_3/etc/smb.conf
+testit "samba3-upgrade-testparm-getlocalsid" $samba_net getlocalsid samba --configfile=$PREFIX/samba3-upgrade/s4_3/etc/smb.conf
+testit "samba3-upgrade-testparm-getdomainsid" $samba_net getdomainsid --configfile=$PREFIX/samba3-upgrade/s4_3/etc/smb.conf
rm -rf $PREFIX/samba3-upgrade
diff --git a/source4/setup/tests/blackbox_start_backup.sh b/source4/setup/tests/blackbox_start_backup.sh
index f1cfd53c5b6..8855609511b 100755
--- a/source4/setup/tests/blackbox_start_backup.sh
+++ b/source4/setup/tests/blackbox_start_backup.sh
@@ -56,7 +56,7 @@ start_backup()
OPTS="$OPTS --debug-stderr"
# start samba and capture the debug output
- OUTPUT=$($BINDIR/samba -s $DBPATH/etc/smb.conf $OPTS 2>&1)
+ OUTPUT=$($BINDIR/samba --configfile=$DBPATH/etc/smb.conf $OPTS 2>&1)
if [ $? -eq 0 ] ; then
echo "ERROR: Samba should not have started successfully"
return 1
diff --git a/source4/setup/tests/blackbox_upgradeprovision.sh b/source4/setup/tests/blackbox_upgradeprovision.sh
index 5222b5ca924..e53e7031cd2 100755
--- a/source4/setup/tests/blackbox_upgradeprovision.sh
+++ b/source4/setup/tests/blackbox_upgradeprovision.sh
@@ -26,7 +26,7 @@ upgradeprovision() {
rm -fr $PREFIX/upgradeprovision
fi
$PYTHON $BINDIR/samba-tool domain provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision" --server-role="dc" --use-ntvfs --base-schema=2008_R2
- $PYTHON $BINDIR/samba_upgradeprovision -s "$PREFIX/upgradeprovision/etc/smb.conf" --debugchange
+ $PYTHON $BINDIR/samba_upgradeprovision --configfile="$PREFIX/upgradeprovision/etc/smb.conf" --debugchange
}
upgradeprovision_full() {
@@ -34,7 +34,7 @@ upgradeprovision_full() {
rm -fr $PREFIX/upgradeprovision_full
fi
$PYTHON $BINDIR/samba-tool domain provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision_full" --server-role="dc" --use-ntvfs --base-schema=2008_R2
- $PYTHON $BINDIR/samba_upgradeprovision -s "$PREFIX/upgradeprovision_full/etc/smb.conf" --full --debugchange
+ $PYTHON $BINDIR/samba_upgradeprovision --configfile="$PREFIX/upgradeprovision_full/etc/smb.conf" --full --debugchange
}
# The ldapcmp runs here are to ensure that a 'null' run of
diff --git a/source4/torture/drs/python/ridalloc_exop.py b/source4/torture/drs/python/ridalloc_exop.py
index 3c7b39b280a..8efdd6a0603 100644
--- a/source4/torture/drs/python/ridalloc_exop.py
+++ b/source4/torture/drs/python/ridalloc_exop.py
@@ -293,7 +293,7 @@ class DrsReplicaSyncTestCase(drs_base.DrsBaseTestCase):
self.assertFalse("rIDSetReferences" in res[0])
- (result, out, err) = self.runsubcmd("fsmo", "seize", "--role", "rid", "-H", ldb_url, "-s", smbconf, "--force")
+ (result, out, err) = self.runsubcmd("fsmo", "seize", "--role", "rid", "-H", ldb_url, "--configfile=%s" % (smbconf), "--force")
self.assertCmdSuccess(result, out, err)
self.assertEqual(err, "", "Shouldn't be any error messages")
@@ -621,7 +621,7 @@ class DrsReplicaSyncTestCase(drs_base.DrsBaseTestCase):
self.assertTrue("rIDSetReferences" in res[0])
rid_set_dn = ldb.Dn(new_ldb, res[0]["rIDSetReferences"][0].decode('utf8'))
# 4. Seize the RID Manager role
- (result, out, err) = self.runsubcmd("fsmo", "seize", "--role", "rid", "-H", ldb_url, "-s", smbconf, "--force")
+ (result, out, err) = self.runsubcmd("fsmo", "seize", "--role", "rid", "-H", ldb_url, "--configfile=%s" % (smbconf), "--force")
self.assertCmdSuccess(result, out, err)
self.assertEqual(err, "", "Shouldn't be any error messages")
diff --git a/source4/torture/drs/python/samba_tool_drs.py b/source4/torture/drs/python/samba_tool_drs.py
index 988f1dc7a3c..ac97162e23d 100644
--- a/source4/torture/drs/python/samba_tool_drs.py
+++ b/source4/torture/drs/python/samba_tool_drs.py
@@ -203,7 +203,7 @@ class SambaToolDrsTests(drs_base.DrsBaseTestCase):
new_dc_config_file = "%s/etc/smb.conf" % self.tempdir
- self.check_output("samba-tool drs replicate --local %s %s %s %s -s %s"
+ self.check_output("samba-tool drs replicate --local %s %s %s %s --configfile=%s"
% ("invalid", self.dc1, nc_name,
self.cmdline_creds, new_dc_config_file))
@@ -227,7 +227,7 @@ class SambaToolDrsTests(drs_base.DrsBaseTestCase):
self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1)
# pull that change with --local into local db from dc1: should send link and some objects
- out = self.check_output("samba-tool drs replicate --local %s %s %s %s -s %s"
+ out = self.check_output("samba-tool drs replicate --local %s %s %s %s --configfile=%s"
% ("invalid", self.dc1, nc_name,
self.cmdline_creds, new_dc_config_file))
@@ -238,7 +238,7 @@ class SambaToolDrsTests(drs_base.DrsBaseTestCase):
# pull that change with --local into local db from dc2: shouldn't send link or object
# as we sent an up-to-dateness vector showing that we had already synced with DC1
- out = self.check_output("samba-tool drs replicate --local %s %s %s %s -s %s"
+ out = self.check_output("samba-tool drs replicate --local %s %s %s %s --configfile=%s"
% ("invalid", self.dc2, nc_name,
self.cmdline_creds, new_dc_config_file))
@@ -247,7 +247,7 @@ class SambaToolDrsTests(drs_base.DrsBaseTestCase):
self.assertEqual(obj_2, 0)
self.assertEqual(link_2, 0)
- self.check_output("samba-tool domain demote --remove-other-dead-server=%s -H ldap://%s %s -s %s"
+ self.check_output("samba-tool domain demote --remove-other-dead-server=%s -H ldap://%s %s --configfile=%s"
% (netbiosname, self.dc1, self.cmdline_creds, new_dc_config_file))
def test_samba_tool_replicate_machine_creds_P(self):
diff --git a/source4/torture/drs/python/samba_tool_drs_no_dns.py b/source4/torture/drs/python/samba_tool_drs_no_dns.py
index 41ae51374ce..33b43b48d05 100644
--- a/source4/torture/drs/python/samba_tool_drs_no_dns.py
+++ b/source4/torture/drs/python/samba_tool_drs_no_dns.py
@@ -103,11 +103,11 @@ class SambaToolDrsNoDnsTests(drs_base.DrsBaseTestCase):
forestdns_dn = ldb.binary_encode('DC=ForestDNSZones,' + str(nc_name))
domaindns_dn = ldb.binary_encode('DC=DomainDNSZones,' + str(nc_name))
- self.check_output("samba-tool drs replicate --local %s %s %s %s -s %s --full-sync"
+ self.check_output("samba-tool drs replicate --local %s %s %s %s --configfile=%s --full-sync"
% ("invalid", self.dc1, forestdns_dn,
self.cmdline_creds, new_dc_config_file))
- self.check_output("samba-tool drs replicate --local %s %s %s %s -s %s --full-sync"
+ self.check_output("samba-tool drs replicate --local %s %s %s %s --configfile=%s --full-sync"
% ("invalid", self.dc1, domaindns_dn,
self.cmdline_creds, new_dc_config_file))
@@ -122,7 +122,7 @@ class SambaToolDrsNoDnsTests(drs_base.DrsBaseTestCase):
expression="(msds-hasmasterncs=%s)" % domaindns_dn)
self.assertEqual(len(res), 0)
- self.check_output("samba_upgradedns -s %s" % (new_dc_config_file))
+ self.check_output("samba_upgradedns --configfile=%s" % (new_dc_config_file))
res = samdb.search(base=server_ds_name,
expression="(msds-hasmasterncs=%s)" % forestdns_dn)
@@ -143,11 +143,11 @@ class SambaToolDrsNoDnsTests(drs_base.DrsBaseTestCase):
try:
# This fixes any forward-link-backward-link issues with the tools
- self.check_output("samba-tool dbcheck -s %s --cross-ncs --fix --yes" % (new_dc_config_file))
+ self.check_output("samba-tool dbcheck --configfile=%s --cross-ncs --fix --yes" % (new_dc_config_file))
except BlackboxProcessError as e:
self.assertTrue("Checked " in get_string(e.stdout))
- self.check_output("samba-tool dbcheck -s %s --cross-ncs" % (new_dc_config_file))
+ self.check_output("samba-tool dbcheck --configfile=%s --cross-ncs" % (new_dc_config_file))
# Compare the two directories
self.check_output("samba-tool ldapcmp ldap://%s ldb://%s %s --filter=%s" %
@@ -179,5 +179,5 @@ class SambaToolDrsNoDnsTests(drs_base.DrsBaseTestCase):
self.assertEqual(len(res), 1)
# Demote the DC we created in the test
- self.check_output("samba-tool domain demote --remove-other-dead-server=%s -H ldap://%s %s -s %s"
+ self.check_output("samba-tool domain demote --remove-other-dead-server=%s -H ldap://%s %s --configfile=%s"
% (netbiosname, self.dc1, self.cmdline_creds, new_dc_config_file))