From: John Mulligan Date: Thu, 9 May 2024 18:29:08 +0000 (-0400) Subject: mgr/smb: add test coverage for creating users with cluster X-Git-Tag: testing/wip-pdonnell-testing-20240703.143006-debug~23^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=632e516f3281528d48842f004b169d72f93cdd33;p=ceph-ci.git mgr/smb: add test coverage for creating users with cluster Signed-off-by: John Mulligan --- diff --git a/src/pybind/mgr/smb/tests/test_smb.py b/src/pybind/mgr/smb/tests/test_smb.py index ad067272538..cf788e15621 100644 --- a/src/pybind/mgr/smb/tests/test_smb.py +++ b/src/pybind/mgr/smb/tests/test_smb.py @@ -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)