]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pytest:samba-tool domain auth policy: expect error message detail
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 9 Nov 2023 22:47:07 +0000 (11:47 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 15 Nov 2023 22:07:35 +0000 (22:07 +0000)
The knownfail will stay around for a few commits, because the message
we get is slightly wrong.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/samba_tool/domain_auth_policy.py
selftest/knownfail.d/domain_auth_policy-errmsg [new file with mode: 0644]

index a7a7a8319330048a9d34b7dd70a07068ece877aa..21d75591a6257c20499c8af1d1dc1ee815d0ded7 100644 (file)
@@ -295,7 +295,7 @@ class AuthPolicyCmdTestCase(SiloTest):
 
         self.assertEqual(result, -1)
         self.assertIn("Unable to parse SDDL", err)
-        self.assertIn(" *INVALID SDDL*\n ^\n unknown error", err)
+        self.assertIn(" *INVALID SDDL*\n ^\n expected '[OGDS]:' section start ", err)
 
     def test_create__invalid_sddl_conditional_ace(self):
         """Test creating a new authentication policy with invalid SDDL in a field."""
@@ -335,8 +335,8 @@ class AuthPolicyCmdTestCase(SiloTest):
         self.assertEqual(result, -1)
         self.assertIn("Unable to parse SDDL", err)
         self.assertIn(sddl, err)
-        self.assertIn(f"\n{'^':>12}", err)
-        self.assertIn("unknown error", err)
+        self.assertIn(f"\n{'^':>13}", err)
+        self.assertIn("\n malformed ACE with only 4 ';'\n", err)
         self.assertNotIn("  File ", err)  # traceback marker
 
     def test_create__device_attribute_in_sddl_allowed_to(self):
diff --git a/selftest/knownfail.d/domain_auth_policy-errmsg b/selftest/knownfail.d/domain_auth_policy-errmsg
new file mode 100644 (file)
index 0000000..4790594
--- /dev/null
@@ -0,0 +1 @@
+samba.tests.samba_tool.domain_auth_policy.samba.tests.samba_tool.domain_auth_policy.AuthPolicyCmdTestCase.test_create__invalid_sddl_normal_ace