MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / assert_pod_properties

Function assert_pod_properties

test/cloudtest/test_system_clusters.py:15–27  ·  view source on GitHub ↗
(mz: MaterializeApplication, pod_name: str)

Source from the content-addressed store, hash-verified

13
14
15def assert_pod_properties(mz: MaterializeApplication, pod_name: str) -> None:
16 pod_desc = json.loads(mz.kubectl("get", "-o", "json", "pod", pod_name))
17 node_selector = pod_desc["spec"]["nodeSelector"]
18
19 expected_disk_selection_mode = "true"
20
21 assert any(
22 "disk" in k and v == expected_disk_selection_mode
23 for k, v in node_selector.items()
24 ), f"pod {pod_name} does not have the disk={expected_disk_selection_mode} selector"
25 assert not any(
26 "availability-zone" in k for k in node_selector.keys()
27 ), f"pod {pod_name} has a availability-zone selector"
28
29
30def test_system_clusters(mz: MaterializeApplication) -> None:

Callers 1

test_system_clustersFunction · 0.85

Calls 4

anyFunction · 0.85
kubectlMethod · 0.45
itemsMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected