From: Douglas Bagnall Date: Thu, 4 Aug 2022 22:48:06 +0000 (+1200) Subject: pytest/netcmd: test samba-tool testparm global section X-Git-Tag: samba-4.17.0rc1~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0d96197fdd9ea85bc320768b578a02b80bedbb9;p=thirdparty%2Fsamba.git pytest/netcmd: test samba-tool testparm global section Signed-off-by: Douglas Bagnall Reviewed-by: David Mulder --- diff --git a/python/samba/tests/netcmd.py b/python/samba/tests/netcmd.py index 4bcddd332e7..833ad418923 100644 --- a/python/samba/tests/netcmd.py +++ b/python/samba/tests/netcmd.py @@ -94,6 +94,14 @@ class TestParmTests(NetCmdTestCase): "--section-name=tmp"], retcode=None) + def test_section_globals(self): + # We can have '[global]' and '[globals]' + for name in ['global', 'globals']: + self.run_netcmd(cmd_testparm, + [f"--configfile={self.smbconf.name}", + f"--section-name={name}"], + retcode=None) + def test_no_such_section(self): out, err = self.run_netcmd(cmd_testparm, ["--configfile=%s" % self.smbconf.name, diff --git a/selftest/knownfail.d/samba-tool-testparm b/selftest/knownfail.d/samba-tool-testparm new file mode 100644 index 00000000000..e2252dd86fc --- /dev/null +++ b/selftest/knownfail.d/samba-tool-testparm @@ -0,0 +1 @@ +^samba.tests.netcmd.samba.tests.netcmd.TestParmTests.test_section_globals