Skip to content

Commit

Permalink
Improve user_id description, set email where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Nov 6, 2024
1 parent 3a6fdf2 commit 360b72a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8755,7 +8755,7 @@ export interface components {
user_email?: string | null;
/**
* User Id
* @description User ID of user that ran ran job
* @description User ID of user that ran this job
*/
user_id?: string | null;
};
Expand Down Expand Up @@ -16184,7 +16184,7 @@ export interface components {
user_email?: string | null;
/**
* User Id
* @description User ID of user that ran ran job
* @description User ID of user that ran this job
*/
user_id?: string | null;
};
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/schema/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class EncodedJobDetails(JobSummary):
title="Output collections",
description="",
)
user_id: Optional[EncodedDatabaseIdField] = Field(default=None, description="User ID of user that ran ran job")
user_id: Optional[EncodedDatabaseIdField] = Field(default=None, description="User ID of user that ran this job")


class JobDestinationParams(Model):
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy_test/base/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def _setup_user_get_key(self, email, password=None):
return user, self._post(f"users/{user['id']}/api_key", admin=True).json()

@contextmanager
def _different_user(self, email: Optional[str] = OTHER_USER, anon=False):
def _different_user(self, email: Optional[str] = None, anon=False):
"""Use in test cases to switch get/post operations to act as new user
..code-block:: python
Expand All @@ -156,7 +156,6 @@ def _different_user(self, email: Optional[str] = OTHER_USER, anon=False):
self._get("histories") # Gets [email protected] histories.
"""
email = OTHER_USER if email is None else email
original_api_key = self.user_api_key
original_interactor_key = self.galaxy_interactor.api_key
original_cookies = self.galaxy_interactor.cookies
Expand All @@ -165,6 +164,7 @@ def _different_user(self, email: Optional[str] = OTHER_USER, anon=False):
self.galaxy_interactor.cookies = cookies
new_key = None
else:
email = OTHER_USER if email is None else email
_, new_key = self._setup_user_get_key(email)
try:
self.user_api_key = new_key
Expand Down

0 comments on commit 360b72a

Please sign in to comment.