Skip to content

Commit

Permalink
fix: tensorboard list not showing tensorboards [DET-8904] (#669)
Browse files Browse the repository at this point in the history
[e2e_tests changes only]
  • Loading branch information
eecsliu authored and rb-determined-ai committed Nov 2, 2023
1 parent a3988c8 commit 9cd91e4
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions e2e_tests/tests/cluster/test_rbac_ntsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,3 +486,44 @@ def get_proxy(creds: authentication.Credentials, task_id: str) -> Optional[error

# kill the ntsc
kill_ntsc(determined_test_session(creds[0]), typ, created_id)


@pytest.mark.e2e_cpu_rbac
@pytest.mark.skipif(rbac_disabled(), reason="ee rbac is required for this test")
def test_tsb_listed() -> None:
with create_workspaces_with_users(
[
[
(0, ["Editor"]),
(1, ["Viewer"]),
],
]
) as ([workspace], creds):
pid = bindings.post_PostProject(
determined_test_session(creds[0]),
body=bindings.v1PostProjectRequest(name="test", workspaceId=workspace.id),
workspaceId=workspace.id,
).project.id

session = determined_test_session(creds[0])

with logged_in_user(creds[0]):
# experiment for tensorboard
experiment_id = exp.create_experiment(
conf.fixtures_path("no_op/single.yaml"),
conf.fixtures_path("no_op"),
["--project_id", str(pid)],
)

created_id = launch_ntsc(session, workspace.id, "tensorboard", experiment_id)

# list tensorboards and make sure it's included in the response.
tsbs = bindings.get_GetTensorboards(session, workspaceId=workspace.id).tensorboards
assert len(tsbs) == 1, "should be one tensorboard"
assert tsbs[0].id == created_id, "should be the tensorboard we created"

tsbs = bindings.get_GetTensorboards(
determined_test_session(credentials=creds[1]), workspaceId=workspace.id
).tensorboards
assert len(tsbs) == 1, "should be one tensorboard"
assert tsbs[0].id == created_id, "should be the tensorboard we created"

0 comments on commit 9cd91e4

Please sign in to comment.