From 2b8ac5c0c545e66b4dca1d30a6e108e6dda6a647 Mon Sep 17 00:00:00 2001 From: kalyan Date: Fri, 1 Dec 2023 15:03:06 +0530 Subject: [PATCH] increase test coverage Signed-off-by: kalyan --- tests/ml_commons/test_model_connector.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ml_commons/test_model_connector.py b/tests/ml_commons/test_model_connector.py index 6e4849201..a8eee71bd 100644 --- a/tests/ml_commons/test_model_connector.py +++ b/tests/ml_commons/test_model_connector.py @@ -114,6 +114,9 @@ def test_search_connectors(client, test_connector): except Exception as ex: assert False, f"Failed to search connectors due to {ex}" + with pytest.raises(ValueError): + client.search_connectors("test") + @pytest.mark.skipif( OPENSEARCH_VERSION < CONNECTOR_MIN_VERSION, @@ -150,3 +153,6 @@ def test_delete_connector(client, test_connector): assert res["result"] == "not_found" except Exception as ex: assert False, f"Failed to delete connector due to {ex}" + + with pytest.raises(ValueError): + client.delete_connector(connector_id={"test": "fail"})