From: yuliyang Date: Fri, 20 Jul 2018 14:22:37 +0000 (+0800) Subject: qa: add test for https://github.com/ceph/ceph/pull/22790 X-Git-Tag: v14.0.1~749^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=30bd588300d8c8872a3ad418538796184eefd8a3;p=ceph.git qa: add test for https://github.com/ceph/ceph/pull/22790 Signed-off-by: yuliyang --- diff --git a/qa/tasks/radosgw_admin_rest.py b/qa/tasks/radosgw_admin_rest.py index 99a742f13b9..86fc3dbc1ba 100644 --- a/qa/tasks/radosgw_admin_rest.py +++ b/qa/tasks/radosgw_admin_rest.py @@ -246,6 +246,17 @@ def task(ctx, config): assert out['keys'][0]['secret_key'] == secret_key assert not out['suspended'] + # TESTCASE 'info-existing','user','info','existing user query with wrong uid but correct access key','returns correct info' + (ret, out) = rgwadmin_rest(admin_conn, ['user', 'info'], {'access-key' : access_key, 'uid': 'uid_not_exist'}) + + assert out['user_id'] == user1 + assert out['email'] == email + assert out['display_name'] == display_name1 + assert len(out['keys']) == 1 + assert out['keys'][0]['access_key'] == access_key + assert out['keys'][0]['secret_key'] == secret_key + assert not out['suspended'] + # TESTCASE 'suspend-ok','user','suspend','active user','succeeds' (ret, out) = rgwadmin_rest(admin_conn, ['user', 'modify'], {'uid' : user1, 'suspended' : True}) assert ret == 200