summaryrefslogtreecommitdiff
path: root/python/samba/tests
AgeCommit message (Collapse)AuthorFilesLines
2015-09-01python/tests: Add more assertions that we get back the value we expectAndrew Bartlett1-0/+6
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11429 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 1 17:00:53 CEST 2015 on sn-devel-104
2015-09-01python/tests: Add tests for 64 bit signed integersAndrew Bartlett1-1/+27
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11429 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-08-24dbcheck: Add explict tests for unknown and unsorted attributeID valuesAndrew Bartlett1-0/+24
Unknown attributeID values would cause an exception previously, and unsorted attributes cause a failure to replicate with Samba 4.2. In commit 61b978872fe86906611f64430b2608f5e7ea7ad8 we started to sort these values correctly, but previous versions of Samba did not sort them correctly (we sorted high-bit-set values as negative), and then after 9c9df40220234cba973e84b4985d90da1334a1d1 we stoped accepting these. To ensure we are allowed to make this unusual change to the replPropertyMetaData, a new OID is allocated and checked for in repl_meta_data.c BUG: https://bugzilla.samba.org/show_bug.cgi?id=10973 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-08-24python/tests: Add tests for integer overflow handlingAndrew Bartlett1-0/+203
This also documents an issue with our python bindings and lists, as changes to integers in a list of integers are not preserved BUG: https://bugzilla.samba.org/show_bug.cgi?id=11429 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-08-24python: Use an unsigned integer for buf_size, not -1Andrew Bartlett1-1/+1
This will fail once our python bindings correctly check value ranges BUG: https://bugzilla.samba.org/show_bug.cgi?id=11429 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-08-06dns: always add authority recordsKai Blin1-17/+17
Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Kai Blin <kai@samba.org> Autobuild-Date(master): Thu Aug 6 14:06:52 CEST 2015 on sn-devel-104
2015-07-31tests:docs: don't load or test the static param_table.Michael Adam1-49/+0
It is going to be removed for the generated table. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31tests:docs: remove testing the diff between the static and generated tableMichael Adam1-19/+0
This reverts commit 380e0769ad3563dc762fb0c9ebe57d8131846519. This is in preparation of the removal of the committed param_table_static.c Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31tests:docs: test the diff between the static and generated tableMichael Adam1-0/+19
This proves that the committed and the generated parameter tables are identical (modulo order). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31tests:docs: load the full data from the generated param_tableMichael Adam1-0/+6
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31tests:docs: load the full data from the existing param_table.Michael Adam1-0/+6
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31tests:docs: add a function to load the full data structures from the tableMichael Adam1-0/+58
instead of just loading the list of parameter names. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31tests:docs: print more complicated structures than strings in the message.Michael Adam1-0/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31tests:docs: common initialization in docs test.Michael Adam1-43/+35
Just load the structures once at startup. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31param: move the actual table out into param_table_static.cMichael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31tests:docs: teach the test the types cmdlist, bytes, octal, and ustringMichael Adam1-0/+8
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31tests: teach the docs test about boolean-revMichael Adam1-0/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-03python:samba/tests: don't use the x.alter_context() method in dcerpc/bare.pyStefan Metzmacher1-11/+2
Establishing a new context on a given connection using alter_context is supposed to be done by using y = ClientConnection(..., basis_connection=x) The current x.alter_context() can work as it's not allowed to change the abstract or transfer syntax of an existing presentation context. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03python/samba/tests: add fallbacks for assert{Less,Greater}[Equal]()Stefan Metzmacher1-0/+12
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03python/samba/tests: let the output of hexdump() match our C code in ↵Stefan Metzmacher1-6/+10
dump_data_cb() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03python/samba/tests: move hexdump() from DNSTest to TestCaseStefan Metzmacher2-14/+12
This is useful in a lot of test cases. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2015-06-12KCC: ldif_import_export tests dotfiles have contentsDouglas Bagnall1-6/+11
This is regardless of whether validation is available via /usr/bin/dot -Tcanon Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC: ldif_import_export tests checks the dot-filesDouglas Bagnall1-0/+23
if /usr/bin/dot exists, the files should be checked for validity. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC: ldif_import_export tests use samba.tests.TestCaseInTempDirDouglas Bagnall1-19/+21
Rather than making their own tempdirs. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC: add tests for kcc.graph repltimes functionsDouglas Bagnall1-3/+34
There used to be bugs in these. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC: beginning of tests for kcc.graphDouglas Bagnall1-0/+39
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC: add a very puny stub for kcc.kcc_utils testsDouglas Bagnall1-0/+37
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC: remove "forest_of_rings" verification checkDouglas Bagnall1-3/+0
Because it didn't actually check anything. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC move and fix ldif_import_export and graph_utils testsDouglas Bagnall2-27/+17
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC: shift tests/ldif_utils.py to tests/kcc/ldif_import_export.pyDouglas Bagnall1-0/+0
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC: shift tests/graph_utils.py to tests/kcc/graph_utils.pyDouglas Bagnall1-0/+0
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC: add multi-site ldif to ldif_import_export test suiteDouglas Bagnall1-0/+56
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC: test stub for KCC objectDouglas Bagnall1-0/+80
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12KCC: shift samba.ldif_utils to samba.kcc.ldif_import_exportDouglas Bagnall1-3/+3
These functions are really only of use for KCC, and they only import and export rather than be general utils. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-05-30KCC: tests/ldif_utils tests ldif importDouglas Bagnall1-5/+30
Thanks as usual to Andrew Bartlett for his help. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-05-30KCC: ldif_utils: ldif_to_samdb doesn't need creds; begin selftestDouglas Bagnall1-0/+99
The tests are based on the testdata/ldif-utils-test-multisite.ldif which describes a multisite windows network. It was constructed by Garming Sam. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-05-29KCC: test suite for the graph_utilsDouglas Bagnall1-0/+162
This found a few bugs in the tests which were fixed. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri May 29 13:55:54 CEST 2015 on sn-devel-104
2015-05-02param: Remove unused P_SEP and P_SEPARATORMichael Adam1-2/+0
This was only used in swat. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2015-03-31doc: "prune stale" and "sequence timeout" fssd parametersDavid Disseldorp1-1/+1
This change adds smb.conf documentation for the "fss: prune stale" and "fss: sequence timeout" parameters accepted by Samba's FSRVP server. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-17python: Remove ntdb referencesVolker Lendecke1-3/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-17autobuild: Remove ntdb targetVolker Lendecke2-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-17Remove ntdb from scriptsVolker Lendecke2-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-16selftest: rename env dc to ad_dc_ntvfsMichael Adam2-2/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16selftest: rename env plugin_s4_dc to ad_dcMichael Adam1-4/+4
This is the environment that represents our supported production setup of an active directory domain controller. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-12selftest: modify python.samba.test.posixacl to cope with nss_winbind activeMichael Adam1-4/+28
It was observed that adding libnss_winbind (via nss_wrapper) lets the posix acl mapping come out slightly differently with respect to the owner/domain admin who is not explicitly nailed down in the original NT acl. This patch extends the test to react to the presence of nss_winbind in environment and adapts the expected results. This in particular fixes the run of the test against the (changed) plugin_s4_dc environment while keeping the possibility to successfully run it against an env without nss_winbind. Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org>
2015-03-06Implement TestCase.assertIsNotNone for python < 2.7.Jelmer Vernooij1-6/+9
Change-Id: Ieaefdc77495e27bad791075d985a70908e9be1ad Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Mar 6 07:11:43 CET 2015 on sn-devel-104
2015-03-06Implement TestCase.assertIn for older versions of Python.Jelmer Vernooij1-0/+3
Change-Id: I17d855166b439c0bd9344a17a454ea5bc6e057aa Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06Implement assertIsNone for Python < 2.7.Jelmer Vernooij1-0/+3
Change-Id: I3937acb16ca0c5430b70f0af305997878da53c37 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06Handle skips when running on python2.6.Jelmer Vernooij1-9/+57
Change-Id: I8b0a15760a72f41800d23150232c2b0e59e32c32 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06Run cleanup after tearDown, for consistency with Python >= 2.7.Jelmer Vernooij1-2/+3
Change-Id: Ic3ce975e3b2e4b30e07643efb4496ebf36a93284 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>