Skip to content

Commit

Permalink
CDPCAM-69: skip CDP CIDR validation if tunnel enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Alper Akanser <[email protected]>
  • Loading branch information
aakanser committed Aug 18, 2021
1 parent a47a990 commit 669f622
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cdpctl/validation/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ def pytest_runtest_setup(item):
and requested_config_value is not None
):
config_value = get_config_value(
config=configuration, key=requested_config_value_path
config=configuration,
key=requested_config_value_path,
key_value_expected=False,
)
if config_value is not None and config_value != requested_config_value:
pytest.skip(
Expand Down
2 changes: 2 additions & 0 deletions cdpctl/validation/infra/validate_aws_security_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def tunnel_enabled(config: Dict[str, Any]):

@pytest.mark.aws
@pytest.mark.infra
@pytest.mark.config_value(path="env:tunnel", value=False)
def aws_default_security_groups_contains_cdp_cidr_validation(
config: Dict[str, Any],
cdp_cidrs: List[str],
Expand Down Expand Up @@ -134,6 +135,7 @@ def _aws_default_security_groups_contains_cdp_cidr_validation(

@pytest.mark.aws
@pytest.mark.infra
@pytest.mark.config_value(path="env:tunnel", value=False)
def aws_gateway_security_groups_contains_cdp_cidr_validation(
config: Dict[str, Any],
cdp_cidrs: List[str],
Expand Down
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
markers =
aws
infra
config_value
norecursedirs = cdpctl/validation/*

0 comments on commit 669f622

Please sign in to comment.