Skip to content

Commit

Permalink
test for has_diff with None subnet
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Oberlechner <[email protected]>
  • Loading branch information
geoberle committed Mar 4, 2024
1 parent 03af593 commit 7a8946b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion reconcile/test/test_ocm_machine_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,13 @@ def test_pool_node_pool_invalid_diff_subnet(node_pool, cluster_machine_pool):
assert node_pool.invalid_diff(cluster_machine_pool)


def test_pool_node_pool_valid_diff_subnet(node_pool, cluster_machine_pool):
cluster_machine_pool.subnet = None
node_pool.subnet = "foo"
cluster_machine_pool.replicas = 2
assert not node_pool.has_diff(cluster_machine_pool)


def test_pool_node_pool_invalid_diff_instance_type(node_pool, cluster_machine_pool):
cluster_machine_pool.instance_type = "foo"
assert node_pool.invalid_diff(cluster_machine_pool)
Expand Down Expand Up @@ -1114,7 +1121,7 @@ def test_update_app_interface_with_subnet(
mocker: MockerFixture,
hypershift_cluster: ClusterV1,
) -> None:
hypershift_cluster.machine_pools[0].subnet = None
hypershift_cluster.machine_pools[0].subnet = None # type: ignore
setup_mocks(
mocker,
clusters=[hypershift_cluster],
Expand Down

0 comments on commit 7a8946b

Please sign in to comment.