summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-01-03 01:13:09 +0100
committerJelmer Vernooij <jelmer@samba.org>2011-01-03 01:48:05 +0100
commit9fc2e6c352726d9b14afb5defaee399d20cf9b23 (patch)
tree5a63e9d94bb99b6ef263a640946616274e72e36b /source4/torture
parent0346f5163227f52d8656a923b86099770609dff4 (diff)
downloadsamba-9fc2e6c352726d9b14afb5defaee399d20cf9b23.tar.gz
samba-9fc2e6c352726d9b14afb5defaee399d20cf9b23.tar.bz2
samba-9fc2e6c352726d9b14afb5defaee399d20cf9b23.zip
Use TestCase.get_credentials() where possible.
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/drs/python/delete_object.py2
-rw-r--r--source4/torture/drs/python/fsmo.py2
-rw-r--r--source4/torture/drs/python/repl_schema.py2
-rw-r--r--source4/torture/libnet/python/samr-test.py7
4 files changed, 6 insertions, 7 deletions
diff --git a/source4/torture/drs/python/delete_object.py b/source4/torture/drs/python/delete_object.py
index 1762d8fed9..0693898a28 100644
--- a/source4/torture/drs/python/delete_object.py
+++ b/source4/torture/drs/python/delete_object.py
@@ -130,7 +130,7 @@ class DrsDeleteObjectTestCase(samba.tests.TestCase):
# find out where is net command
samba_tool_cmd = os.path.abspath("./bin/samba-tool")
# make command line credentials string
- creds = samba.tests.cmdline_credentials
+ creds = self.get_credentials()
cmd_line_auth = "-U%s/%s%%%s" % (creds.get_domain(),
creds.get_username(), creds.get_password())
# bin/samba-tool drs replicate <Dest_DC_NAME> <Src_DC_NAME> <Naming Context>
diff --git a/source4/torture/drs/python/fsmo.py b/source4/torture/drs/python/fsmo.py
index 880c8db1b9..cdee7ab518 100644
--- a/source4/torture/drs/python/fsmo.py
+++ b/source4/torture/drs/python/fsmo.py
@@ -92,7 +92,7 @@ class DrsFsmoTestCase(samba.tests.TestCase):
# find out where is samba-tool command
net_cmd = os.path.abspath("./bin/samba-tool")
# make command line credentials string
- creds = samba.tests.cmdline_credentials
+ creds = self.get_credentials()
cmd_line_auth = "-U%s/%s%%%s" % (creds.get_domain(),
creds.get_username(), creds.get_password())
# bin/samba-tool fsmo transfer --role=role --host=ldap://DC:389
diff --git a/source4/torture/drs/python/repl_schema.py b/source4/torture/drs/python/repl_schema.py
index ea44626472..a98452ed13 100644
--- a/source4/torture/drs/python/repl_schema.py
+++ b/source4/torture/drs/python/repl_schema.py
@@ -92,7 +92,7 @@ class DrsReplSchemaTestCase(samba.tests.TestCase):
# find out where is net command
samba_tool_cmd = os.path.abspath("./bin/samba-tool")
# make command line credentials string
- creds = samba.tests.cmdline_credentials
+ creds = self.get_credentials()
cmd_line_auth = "-U%s/%s%%%s" % (creds.get_domain(),
creds.get_username(), creds.get_password())
# bin/samba-tool drs replicate <Dest_DC_NAME> <Src_DC_NAME> <Naming Context>
diff --git a/source4/torture/libnet/python/samr-test.py b/source4/torture/libnet/python/samr-test.py
index a63236b7e6..fcd31c4b02 100644
--- a/source4/torture/libnet/python/samr-test.py
+++ b/source4/torture/libnet/python/samr-test.py
@@ -32,16 +32,14 @@ from samba import net
import samba.tests
if not "ACCOUNT_NAME" in os.environ.keys():
- parser.error("Please supply ACCOUNT_NAME in environment")
+ raise Exception("Please supply ACCOUNT_NAME in environment")
if not "NEW_PASS" in os.environ.keys():
- parser.error("Please supply NEW_PASS in environment")
+ raise Exception("Please supply NEW_PASS in environment")
account_name = os.environ["ACCOUNT_NAME"]
new_pass = os.environ["NEW_PASS"]
-creds = samba.tests.cmdline_credentials
-
#
# Tests start here
#
@@ -51,6 +49,7 @@ class Libnet_SetPwdTest(samba.tests.TestCase):
########################################################################################
def test_SetPassword(self):
+ creds = self.get_credentials()
net.SetPassword(account_name=account_name,
domain_name=creds.get_domain(),
newpassword=new_pass,