Skip to content

Commit

Permalink
Add another user journey test for a developer creating an env
Browse files Browse the repository at this point in the history
  • Loading branch information
peytondmurray committed Mar 14, 2024
1 parent e5eaa69 commit a1d1c41
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions conda-store-server/tests/user_journeys/test_user_journeys.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ def test_admin_user_can_create_environment(
def test_admin_login_and_delete_shared_environment(
base_url: str, specification_path: str
) -> None:
"""Test that a user can login and delete an environment in a shared namespace."""
"""Test that an admin can login and create/delete an env in a shared namespace."""
api = utils.API(base_url=base_url)

# Create a shared namespace; default permissions for namepace/environment */* is admin
# Create a shared namespace; default permissions for namepace/environment
# */* is admin
namespace = api.create_namespace().json()["data"]["name"]
environment = api.create_environment(
namespace,
Expand All @@ -68,19 +69,21 @@ def test_admin_login_and_delete_shared_environment(
("tests/user_journeys/test_data/simple_environment.yaml"),
],
)
def test_user_login_and_delete_shared_environment(
def test_user_login_and_create_shared_environment(
base_url: str, specification_path: str
) -> None:
"""Test that a user can login and delete an environment in a shared namespace."""
"""Test that a user can login and create an environment in a shared namespace."""
api = utils.API(base_url=base_url)
# Create a shared namespace; default permissions for namepace/environment */* is admin

# Create a shared namespace; default permissions for namepace/environment
# */* is admin
namespace = api.create_namespace().json()["data"]["name"]

dev_api = utils.API(
base_url=base_url,
token=api.create_token(
namespace,
'editor',
'developer',
).json()['data']['token']
)

Expand All @@ -89,5 +92,5 @@ def test_user_login_and_delete_shared_environment(
specification_path,
).json()["data"]["specification"]["name"]

dev_api.delete_environment(namespace, environment)
api.delete_environment(namespace, environment)
api.delete_namespace(namespace)

0 comments on commit a1d1c41

Please sign in to comment.