Skip to content

Commit 5794e7a

Browse files
committed
Update inference integ test to add dependency to improve telemetry exception count data
1 parent 631ddf9 commit 5794e7a

File tree

6 files changed

+28
-8
lines changed

6 files changed

+28
-8
lines changed

test/integration_tests/inference/cli/test_cli_custom_fsx_inference.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ def test_custom_create(runner, custom_endpoint_name):
6666
assert result.exit_code == 0, result.output
6767

6868

69+
@pytest.mark.dependency(depends=["create"])
6970
def test_custom_list(runner, custom_endpoint_name):
7071
result = runner.invoke(custom_list, ["--namespace", NAMESPACE])
7172
assert result.exit_code == 0
7273
assert custom_endpoint_name in result.output
7374

7475

75-
@pytest.mark.dependency(name="describe")
76+
@pytest.mark.dependency(name="describe", depends=["create"])
7677
def test_custom_describe(runner, custom_endpoint_name):
7778
result = runner.invoke(custom_describe, [
7879
"--name", custom_endpoint_name,
@@ -114,6 +115,7 @@ def test_wait_until_inservice(custom_endpoint_name):
114115
pytest.fail("[ERROR] Timed out waiting for endpoint to be DeploymentComplete")
115116

116117

118+
@pytest.mark.dependency(depends=["create"])
117119
def test_custom_invoke(runner, custom_endpoint_name):
118120
result = runner.invoke(custom_invoke, [
119121
"--endpoint-name", custom_endpoint_name,
@@ -133,7 +135,8 @@ def test_custom_list_pods(runner):
133135
result = runner.invoke(custom_list_pods, ["--namespace", NAMESPACE])
134136
assert result.exit_code == 0
135137

136-
138+
139+
@pytest.mark.dependency(depends=["create"])
137140
def test_custom_delete(runner, custom_endpoint_name):
138141
result = runner.invoke(custom_delete, [
139142
"--name", custom_endpoint_name,

test/integration_tests/inference/cli/test_cli_custom_s3_inference.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ def test_custom_create(runner, custom_endpoint_name):
6666
assert result.exit_code == 0, result.output
6767

6868

69+
@pytest.mark.dependency(depends=["create"])
6970
def test_custom_list(runner, custom_endpoint_name):
7071
result = runner.invoke(custom_list, ["--namespace", NAMESPACE])
7172
assert result.exit_code == 0
7273
assert custom_endpoint_name in result.output
7374

7475

75-
@pytest.mark.dependency(name="describe")
76+
@pytest.mark.dependency(name="describe", depends=["create"])
7677
def test_custom_describe(runner, custom_endpoint_name):
7778
result = runner.invoke(custom_describe, [
7879
"--name", custom_endpoint_name,
@@ -114,6 +115,7 @@ def test_wait_until_inservice(custom_endpoint_name):
114115
pytest.fail("[ERROR] Timed out waiting for endpoint to be DeploymentComplete")
115116

116117

118+
@pytest.mark.dependency(depends=["create"])
117119
def test_custom_invoke(runner, custom_endpoint_name):
118120
result = runner.invoke(custom_invoke, [
119121
"--endpoint-name", custom_endpoint_name,
@@ -134,6 +136,7 @@ def test_custom_list_pods(runner):
134136
assert result.exit_code == 0
135137

136138

139+
@pytest.mark.dependency(depends=["create"])
137140
def test_custom_delete(runner, custom_endpoint_name):
138141
result = runner.invoke(custom_delete, [
139142
"--name", custom_endpoint_name,

test/integration_tests/inference/cli/test_cli_jumpstart_inference.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ def test_js_create(runner, js_endpoint_name):
4040
assert result.exit_code == 0, result.output
4141

4242

43+
@pytest.mark.dependency(depends=["create"])
4344
def test_js_list(runner, js_endpoint_name):
4445
result = runner.invoke(js_list, ["--namespace", NAMESPACE])
4546
assert result.exit_code == 0
4647
assert js_endpoint_name in result.output
4748

4849

49-
@pytest.mark.dependency(name="describe")
50+
@pytest.mark.dependency(name="describe", depends=["create"])
5051
def test_js_describe(runner, js_endpoint_name):
5152
result = runner.invoke(js_describe, [
5253
"--name", js_endpoint_name,
@@ -88,6 +89,7 @@ def test_wait_until_inservice(js_endpoint_name):
8889
pytest.fail("[ERROR] Timed out waiting for endpoint to be DeploymentComplete")
8990

9091

92+
@pytest.mark.dependency(depends=["create"])
9193
def test_custom_invoke(runner, js_endpoint_name):
9294
result = runner.invoke(custom_invoke, [
9395
"--endpoint-name", js_endpoint_name,
@@ -107,6 +109,7 @@ def test_js_list_pods(runner):
107109
assert result.exit_code == 0
108110

109111

112+
@pytest.mark.dependency(depends=["create"])
110113
def test_js_delete(runner, js_endpoint_name):
111114
result = runner.invoke(js_delete, [
112115
"--name", js_endpoint_name,

test/integration_tests/inference/sdk/test_sdk_custom_fsx_inference.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,13 @@ def test_create_endpoint(custom_endpoint):
8989
custom_endpoint.create(namespace=NAMESPACE)
9090
assert custom_endpoint.metadata.name == ENDPOINT_NAME
9191

92+
@pytest.mark.dependency(depends=["create"])
9293
def test_list_endpoint():
9394
endpoints = HPEndpoint.list(namespace=NAMESPACE)
9495
names = [ep.metadata.name for ep in endpoints]
9596
assert ENDPOINT_NAME in names
9697

97-
@pytest.mark.dependency(name="describe")
98+
@pytest.mark.dependency(name="describe", depends=["create"])
9899
def test_get_endpoint():
99100
ep = HPEndpoint.get(name=ENDPOINT_NAME, namespace=NAMESPACE)
100101
assert ep.modelName == MODEL_NAME
@@ -129,6 +130,7 @@ def test_wait_until_inservice():
129130

130131
pytest.fail("[ERROR] Timed out waiting for endpoint to be DeploymentComplete")
131132

133+
@pytest.mark.dependency(depends=["create"])
132134
def test_invoke_endpoint(monkeypatch):
133135
original_transform = codec.transform
134136

@@ -157,7 +159,7 @@ def test_list_pods():
157159
pods = ep.list_pods(NAMESPACE)
158160
assert pods
159161

160-
162+
@pytest.mark.dependency(depends=["create"])
161163
def test_delete_endpoint():
162164
ep = HPEndpoint.get(name=ENDPOINT_NAME, namespace=NAMESPACE)
163165
ep.delete()

test/integration_tests/inference/sdk/test_sdk_custom_s3_inference.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,15 @@ def test_create_endpoint(custom_endpoint):
9090
custom_endpoint.create(namespace=NAMESPACE)
9191
assert custom_endpoint.metadata.name == ENDPOINT_NAME
9292

93+
94+
@pytest.mark.dependency(depends=["create"])
9395
def test_list_endpoint():
9496
endpoints = HPEndpoint.list(namespace=NAMESPACE)
9597
names = [ep.metadata.name for ep in endpoints]
9698
assert ENDPOINT_NAME in names
9799

98-
@pytest.mark.dependency(name="describe")
100+
101+
@pytest.mark.dependency(name="describe", depends=["create"])
99102
def test_get_endpoint():
100103
ep = HPEndpoint.get(name=ENDPOINT_NAME, namespace=NAMESPACE)
101104
assert ep.modelName == MODEL_NAME
@@ -130,6 +133,8 @@ def test_wait_until_inservice():
130133

131134
pytest.fail("[ERROR] Timed out waiting for endpoint to be DeploymentComplete")
132135

136+
137+
@pytest.mark.dependency(depends=["create"])
133138
def test_invoke_endpoint(monkeypatch):
134139
original_transform = codec.transform
135140

@@ -159,6 +164,7 @@ def test_list_pods():
159164
assert pods
160165

161166

167+
@pytest.mark.dependency(depends=["create"])
162168
def test_delete_endpoint():
163169
ep = HPEndpoint.get(name=ENDPOINT_NAME, namespace=NAMESPACE)
164170
ep.delete()

test/integration_tests/inference/sdk/test_sdk_jumpstart_inference.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ def test_create_endpoint(endpoint_obj):
3838
endpoint_obj.create(namespace=NAMESPACE)
3939
assert endpoint_obj.metadata.name == ENDPOINT_NAME
4040

41+
@pytest.mark.dependency(depends=["create"])
4142
def test_list_endpoint():
4243
endpoints = HPJumpStartEndpoint.list(namespace=NAMESPACE)
4344
names = [ep.metadata.name for ep in endpoints]
4445
assert ENDPOINT_NAME in names
4546

46-
@pytest.mark.dependency(name="describe")
47+
@pytest.mark.dependency(name="describe", depends=["create"])
4748
def test_get_endpoint():
4849
ep = HPJumpStartEndpoint.get(name=ENDPOINT_NAME, namespace=NAMESPACE)
4950
assert ep.metadata.name == ENDPOINT_NAME
@@ -80,6 +81,7 @@ def test_wait_until_inservice():
8081
pytest.fail("[ERROR] Timed out waiting for endpoint to be DeploymentComplete")
8182

8283

84+
@pytest.mark.dependency(depends=["create"])
8385
def test_invoke_endpoint(monkeypatch):
8486
original_transform = codec.transform # Save original
8587

@@ -107,6 +109,7 @@ def test_list_pods():
107109
pods = ep.list_pods(NAMESPACE)
108110
assert pods
109111

112+
@pytest.mark.dependency(depends=["create"])
110113
def test_delete_endpoint():
111114
ep = HPJumpStartEndpoint.get(name=ENDPOINT_NAME, namespace=NAMESPACE)
112115
ep.delete()

0 commit comments

Comments
 (0)