Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
Signed-off-by: kalyan <[email protected]>
  • Loading branch information
rawwar committed Nov 9, 2023
1 parent d8479ff commit 99a3660
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/ml_commons/test_model_access_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,14 @@ def test_delete_model_group(client, test_model_group):
OPENSEARCH_VERSION < MAC_MIN_VERSION,
reason="Model groups are supported in OpenSearch 2.8.0 and above",
)
def test_delete_model_group_by_name(client, test_model_group2):
res = client.delete_model_group_by_name(model_group_name="test-unknown")
assert res is None
def test_delete_model_group_by_name(client):
with pytest.raises(NotFoundError):
client.delete_model_group_by_name(model_group_name="test-unknown")

res = client.delete_model_group_by_name(model_group_name=test_model_group2)
model_group = "__test__model_group_5"
client.register_model_group(name=model_group)
time.sleep(2)
res = client.delete_model_group_by_name(model_group_name=model_group)
assert isinstance(res, dict)
assert "result" in res
assert res["result"] == "deleted"

0 comments on commit 99a3660

Please sign in to comment.