Test that cluster replicas have the correct materialize.cloud/disk labels
(mz: MaterializeApplication)
| 126 | |
| 127 | |
| 128 | def test_disk_label(mz: MaterializeApplication) -> None: |
| 129 | """Test that cluster replicas have the correct materialize.cloud/disk labels""" |
| 130 | |
| 131 | mz.environmentd.sql("CREATE CLUSTER disk SIZE = 'scale=1,workers=2'") |
| 132 | |
| 133 | cluster_id, replica_id = mz.environmentd.sql_query( |
| 134 | "SELECT mz_clusters.id, mz_cluster_replicas.id FROM mz_cluster_replicas JOIN mz_clusters ON mz_cluster_replicas.cluster_id = mz_clusters.id WHERE mz_clusters.name = 'disk'" |
| 135 | )[0] |
| 136 | assert cluster_id is not None |
| 137 | assert replica_id is not None |
| 138 | |
| 139 | node_selectors = get_node_selector(mz, cluster_id, replica_id) |
| 140 | assert node_selectors == '\'{"materialize.cloud/disk":"true"}\'', node_selectors |
| 141 | |
| 142 | mz.environmentd.sql("DROP CLUSTER disk CASCADE") |
| 143 | |
| 144 | |
| 145 | @pytest.mark.skip( |
nothing calls this directly
no test coverage detected