Skip to content

Commit

Permalink
Cover network interface PrivateIpAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong committed Sep 6, 2024
1 parent ad55796 commit af295c6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
}
},
"type": "array"
}
},
"PrivateIpAddress": false
}
},
"type": "array"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,38 @@ def rule():
},
[],
),
(
"Invalid with a private ip address in two spots",
{
"PrivateIpAddress": "172.31.35.42",
"NetworkInterfaces": [
{
"PrivateIpAddress": "172.31.35.42",
}
],
},
{
"path": ["Resources", "Instance", "Properties"],
},
[
ValidationError(
"'Primary' cannot be True when 'PrivateIpAddress' is specified",
validator=None,
rule=PrivateIpWithNetworkInterface(),
path=deque(["NetworkInterfaces", 0, "PrivateIpAddress"]),
schema_path=deque(
[
"then",
"properties",
"NetworkInterfaces",
"items",
"properties",
"PrivateIpAddress",
]
),
)
],
),
(
"Invalid with a private ip address",
{
Expand Down

0 comments on commit af295c6

Please sign in to comment.