Skip to content

Commit

Permalink
suite: use owner value for user name
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Cerza <zack@redhat.com>
  • Loading branch information
zmc committed Sep 23, 2024
1 parent 43b8805 commit e1f823a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions teuthology/suite/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ def __init__(self, args):
# We assume timestamp is a datetime.datetime object
self.timestamp = self.args.timestamp or \
datetime.datetime.now().strftime(TIMESTAMP_FMT)
self.user = self.args.user or pwd.getpwuid(os.getuid()).pw_name

self.user = self.args.owner or pwd.getpwuid(os.getuid()).pw_name
self.name = self.make_run_name()

if self.args.ceph_repo:
config.ceph_git_url = self.args.ceph_repo
if self.args.suite_repo:
Expand Down
4 changes: 2 additions & 2 deletions teuthology/suite/test/test_run_.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def test_name(self, m_fetch_repos):
assert str(stamp) in name

@patch('teuthology.suite.run.util.fetch_repos')
def test_name_user(self, m_fetch_repos):
self.args.user = 'USER'
def test_name_owner(self, m_fetch_repos):
self.args.owner = 'USER'
with patch.object(run.Run, 'create_initial_config',
return_value=run.JobConfig()):
name = run.Run(self.args).name
Expand Down

0 comments on commit e1f823a

Please sign in to comment.