Skip to content

Commit

Permalink
additional test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-schndr authored and petrkotas committed Jul 19, 2023
1 parent bb08bf7 commit 2714d67
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion python/az/aro/azext_aro/tests/latest/unit/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,33 @@ def test_validate_refresh_cluster_credentials(test_description, namespace, expec
Mock(outbound_type='Loadbalancer'),
None
),
(
"Should not raise exception when key is Loadbalancer and ingress visibility private",
Mock(
outbound_type='Loadbalancer',
apiserver_visibility="Public",
ingress_visibility="Private"
),
None
),
(
"Should not raise exception when key is Loadbalancer and apiserver visibility private",
Mock(
outbound_type='Loadbalancer',
apiserver_visibility="Private",
ingress_visibility="Public"
),
None
),
(
"Should not raise exception when key is Loadbalancer and ingress/apiserver visibility private",
Mock(
outbound_type='Loadbalancer',
apiserver_visibility="Private",
ingress_visibility="Private"
),
None
),
(
"Should not raise exception when key is empty.",
Mock(outbound_type=None),
Expand All @@ -798,14 +825,32 @@ def test_validate_refresh_cluster_credentials(test_description, namespace, expec
None
),
(
"Should raise exception with UDR and either ingress or apiserver visibility is public",
"Should raise exception with UDR and ingress visibility is public",
Mock(
outbound_type="UserDefinedRouting",
apiserver_visibility="Private",
ingress_visibility="Public"
),
InvalidArgumentValueError
),
(
"Should raise exception with UDR and apiserver visibility is public",
Mock(
outbound_type="UserDefinedRouting",
apiserver_visibility="Public",
ingress_visibility="Private"
),
InvalidArgumentValueError
),
(
"Should raise exception with UDR and apiserver/ingress visibility is public",
Mock(
outbound_type="UserDefinedRouting",
apiserver_visibility="Public",
ingress_visibility="Public"
),
InvalidArgumentValueError
),
(
"Should raise exception when key is UserDefinedRouting and apiserver/ingress visibilities are not defined.",
Mock(
Expand Down

0 comments on commit 2714d67

Please sign in to comment.