Skip to content

Commit

Permalink
Updated test logic so sync with changes to Serve.
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredeen committed Apr 17, 2024
1 parent ab83dc1 commit cc88b22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion source/locust.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ locustfile = tests
#headless = true
#master = true
#expect-workers = 5
host = https://serve-dev.scilifelab.se
host = https://staging.serve-dev.scilifelab.se
users = 1
spawn-rate = 1
run-time = 10s
Expand Down
12 changes: 6 additions & 6 deletions source/tests/base_user_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def register_user(self):
last_name="Me",
affiliation="other",
department="Dept ABC",
password1="ac3ya89ni3wk",
password2="ac3ya89ni3wk",
password1="Ac3ya89ni3wk!",
password2="Ac3ya89ni3wk!",
note="",
csrfmiddlewaretoken=self.csrftoken,
)
Expand Down Expand Up @@ -234,12 +234,12 @@ def create_project(self, project_name: str):
logger.debug("create project response.status_code = %s, %s", response.status_code, response.reason)
# If succeeds then url = /<username>/<project-name>
logger.debug("create project response.url = %s", response.url)
if self.username in response.url and project_name in response.url:
if project_name in response.url:
logger.info("Successfully created project %s", project_name)
self.project_url = response.url
else:
logger.warning(response.content)
response.failure("Create project failed. Response URL does not contain username and project name.")
response.failure("Create project failed. Response URL does not contain project name.")

def delete_project(self):
# Update the csrf token
Expand Down Expand Up @@ -327,8 +327,8 @@ def open_user_app(self):
# Staging
# ex: https://loadtest-shinyproxy2.staging.serve-dev.scilifelab.se/app/loadtest-shinyproxy2
# from host: https://staging.serve-dev.scilifelab.se
APP_SHINYPROXY = self.host.replace("https://", "https://loadtest-shinyproxy2.")
APP_SHINYPROXY += "/app/loadtest-shinyproxy2"
APP_SHINYPROXY = self.host.replace("https://", "https://loadtest-shinyproxy3.")
APP_SHINYPROXY += "/app/loadtest-shinyproxy3"

elif "serve.scilifelab.se" in self.host:
# Production
Expand Down

0 comments on commit cc88b22

Please sign in to comment.