summaryrefslogtreecommitdiff
path: root/python/samba/tests/docs.py
AgeCommit message (Collapse)AuthorFilesLines
2018-12-06docs-xml: add "smbd max async dosmode"Ralph Boehme1-0/+2
The parameter is added to the lists of ignored-paremteres in the samba.docs tests, as the given default "aio max threads * 2" works only as manpage string. "aio max threads" can only be calculated at run time and requires a handle to a pthreadpool_tevent which loadparm will never have. Because of that lp_smbd_max_async_dosmode() will always return 0 as default and it's up to the caller to calculate "aio max threads * 2" if lp_smbd_max_async_dosmode() returns 0. Cf the next commit. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-12-06tests:docs: add a exceptions setRalph Boehme1-1/+6
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-12-06tests:docs: reindent special_cases to one by lineRalph Boehme1-9/+26
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-11-01python/tests/docs: remove unused import, variablesDouglas Bagnall1-4/+0
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <noel.power@suse.com>
2018-10-23python/samba/tests: make sure samba-tool is called with ${PYTHON}Noel Power1-0/+16
Ensure python scripts are called with the python version that is defined by $PYTHON Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23python/samba/tests: PY3 iterable has no sort methodNoel Power1-1/+1
map in python3 returns an iterable, in python2 it returned a list. Iterable has no sort method, use sort function instead or construct a list from the iterable so you can use list.sort Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-09-07test:doc: Skip 'clustering=yes'Christof Schmitt1-6/+7
As testparm will error out when running clustering=yes as non-root, skip this step to avoid a test failure. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2018-08-24PEP8: line up a couple of listsDouglas Bagnall1-7/+7
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Fri Aug 24 10:58:16 CEST 2018 on sn-devel-144
2018-08-24PEP8: fix E303: too many blank lines (2)Joe Guo1-2/+0
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E302: expected 2 blank lines, found 1Joe Guo1-0/+2
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E251: unexpected spaces around keyword / parameter equalsJoe Guo1-2/+2
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E231: missing whitespace after ','Joe Guo1-3/+3
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E128: continuation line under-indented for visual indentJoe Guo1-28/+57
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E111: indentation is not a multiple of fourJoe Guo1-5/+5
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-04-13selftest: enable py3 for samba.tests.docsJoe Guo1-10/+13
Popen methods will return bytes. Decode output to string before using. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-02-15samba python tests: convert 'except X, e' to 'except X as e'Douglas Bagnall1-2/+2
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-01-08tests:docs: remove explicit exceptions for parametric optionsBjörn Jacke1-5/+3
we don't need to list them all as special cases because we exclude parametric options generally now from the default value test. Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-01-08tests:docs: don't try to test parametric option defaultsBjörn Jacke1-0/+3
we don't get the values of the parametric options. Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-04-29param: Add 'mit kdc command' to change the default.Andreas Schneider1-1/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-04-13param: Check for valid values of 'name resolve order' optionNoel Power1-2/+4
This variable is populated by a list of values where each value should be a known option. This patch ensures that illegal values are detected. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12739 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2017-01-27rpc_server: Allow to configure the port range for RPC servicesAndreas Schneider1-4/+7
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12521 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2016-12-02selftest: Do not include system krb5.conf in selftestAndreas Schneider1-1/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12441 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2016-02-08test:docs: remove unused param_table/get_param_table_full()Michael Adam1-64/+0
No tests use this any more, hence we should not parse the file anymore either. It is generated directly from the parametersr.all.xml file. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
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-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-06Rename TestSkipped to Skiptest, consistent with Python 2.7.Jelmer Vernooij1-2/+1
Change-Id: I023df54363328333f1cb6c3ae3c1a406befa8f7b Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-17tests: Allow "max open files" to differ from the documentationAndrew Bartlett1-1/+2
It is system-dependent. Andrew Bartlett Change-Id: Icf21476c00295a428ad808bc56ab8153f109627f Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-08param: Amend docs.py test to check dumping of flagged parametersGarming Sam1-1/+70
This test uses an empty smb.conf file to check if the resulting output from testparm is empty. It also sets a parameter as default in an smb.conf file and then sets the option on the command line to ensure they are displayed correctly. Change-Id: I48f05b6e3c9e5cd856e89b196e00ae35eb93bf9f Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Jul 8 01:57:59 CEST 2014 on sn-devel-104
2014-07-07param: remove idmap parameters as special cases in docs.pyGarming Sam1-3/+0
Change-Id: Ie2395ddbe9e055b9972fd859615a022d9f675014 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-07-07param: handle smb_ports as a special handlerGarming Sam1-2/+4
Avoids some problems with using str_list_make and str_list_make_v3 and tries to verify if the ports assignment is reasonable Change-Id: I441c4cca605c7548a5023b65994004fbac57d2df Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-05-23tests: Add doc exception for spoolss: OSVERSION.Andreas Schneider1-1/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri May 23 20:10:49 CEST 2014 on sn-devel-104
2014-05-07docs: enable checking of parametric options assignmentGarming Sam1-4/+2
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07param: correctly use param_table.c as a regular C fileGarming Sam1-1/+1
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07docs: add test to docs.py to set parameters to some arbitrary valueGarming Sam1-10/+93
This does not currently test enums. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07docs: change docs.py to test the setting of parameters to defaultsGarming Sam1-0/+39
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-01-31selftest: updated docs.py scriptGarming Sam1-37/+118
The script now checks the parameter defaults against the documentation by using the output of testparm and samba-tool testparm. It now also uses the ElementTree xml library. Change-Id: I2657c8c56a8c8383735e659dc9f636b4c5ab460b Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Jan 31 23:22:09 CET 2014 on sn-devel-104
2013-03-02Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij1-0/+127
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104