]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pytest/netcmd: test samba-tool testparm global section
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 4 Aug 2022 22:48:06 +0000 (10:48 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Sat, 6 Aug 2022 00:45:35 +0000 (00:45 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@suse.com>
python/samba/tests/netcmd.py
selftest/knownfail.d/samba-tool-testparm [new file with mode: 0644]

index 4bcddd332e71e72e5be8fc542fcc65c1ec7d4d12..833ad418923411cc9da99e61587272b6162ff21e 100644 (file)
@@ -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 (file)
index 0000000..e2252dd
--- /dev/null
@@ -0,0 +1 @@
+^samba.tests.netcmd.samba.tests.netcmd.TestParmTests.test_section_globals