Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suite: use owner value for user name #2004

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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