mirror of
https://github.com/samba-team/samba.git
synced 2025-12-17 04:23:50 +03:00
lib/smbconf: add set_global_parameter method to SMBConf
Add a set_global_parameter method wrapping smbconf_set_global_parameter. Signed-off-by: John Mulligan <jmulligan@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
committed by
Jeremy Allison
parent
565d8ae8cd
commit
35df07d5ca
@@ -160,6 +160,17 @@ class SMBConfTests(samba.tests.TestCase):
|
||||
s1, ("foobar", [("path", "/mnt/foobar"), ("browseable", "no")])
|
||||
)
|
||||
|
||||
def test_set_global_parameter(self):
|
||||
sconf = self.s3smbconf.init_reg(None)
|
||||
sconf.drop()
|
||||
sconf.set_global_parameter("workgroup", "EXAMPLE")
|
||||
sconf.set_global_parameter("x:custom", "fake")
|
||||
|
||||
s1 = sconf.get_share("global")
|
||||
self.assertEqual(
|
||||
s1, ("global", [("workgroup", "EXAMPLE"), ("x:custom", "fake")])
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import unittest
|
||||
|
||||
Reference in New Issue
Block a user