qa/rgw: s3tests task configures account ids

s3tests for s3control and iam apis need to know the account id

Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Casey Bodley 2025-08-29 10:51:38 -04:00
parent 8924fe65f8
commit 0cffed8623

View File

@ -94,12 +94,13 @@ def download(ctx, config):
)
def _config_user(s3tests_conf, section, user, email):
def _config_user(s3tests_conf, section, user, email, account):
"""
Configure users for this section by stashing away keys, ids, and
email addresses.
"""
s3tests_conf[section].setdefault('user_id', user)
s3tests_conf[section].setdefault('account_id', account)
s3tests_conf[section].setdefault('email', email)
s3tests_conf[section].setdefault('display_name', 'Mr.{user}'.format(user=user))
s3tests_conf[section].setdefault('access_key',
@ -156,9 +157,9 @@ def create_users(ctx, config, s3tests_conf):
if section == 's3 tenant':
args += ['--tenant', 'testx']
ctx.cluster.only(client).run(args=args)
_config_user(conf, section, account_id, account_email)
_config_user(conf, section, account_id, account_email, account_id)
else:
_config_user(conf, section, user_id, user_email)
_config_user(conf, section, user_id, user_email, None)
# for keystone users, read ec2 credentials into s3tests.conf instead
# of creating a local user