]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/smb: add test coverage for creating users with cluster
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 9 May 2024 18:29:08 +0000 (14:29 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Mon, 24 Jun 2024 12:41:09 +0000 (08:41 -0400)
Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/smb/tests/test_smb.py

index ad067272538e31f9243165620311e819cc7ad60f..cf788e15621750b1f8602f9aefcf7818c3c4ed78 100644 (file)
@@ -555,6 +555,24 @@ def test_cluster_create_user1(tmodule):
     assert len(result.src.user_group_settings) == 1
 
 
+def test_cluster_create_user2(tmodule):
+    _example_cfg_1(tmodule)
+
+    result = tmodule.cluster_create(
+        'dizzle',
+        smb.enums.AuthMode.USER,
+        define_user_pass=['alice%123letmein', 'bob%1n0wh4t1t15'],
+    )
+    assert result.success
+    assert result.status['state'] == 'created'
+    assert result.src.cluster_id == 'dizzle'
+    assert len(result.src.user_group_settings) == 1
+    assert (
+        result.src.user_group_settings[0].source_type
+        == smb.enums.UserGroupSourceType.RESOURCE
+    )
+
+
 def test_cluster_create_badpass(tmodule):
     _example_cfg_1(tmodule)