Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
Elias-elastisys committed Jan 21, 2025
1 parent 758979c commit ba83dde
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/unit/general/bin-update-ips.bats
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ _apply_normalise() {
update_ips.assert_minimal
}

@test "ck8s update-ips blocks all without domain records" {
run ck8s update-ips both apply

assert_equal "$(yq.dig wc '.networkPolicies.global.scIngress.ips | . style="flow"')" "[0.0.0.0/32]"
assert_equal "$(yq.dig wc '.networkPolicies.global.wcIngress.ips | . style="flow"')" "[0.0.0.0/32]"
assert_equal "$(yq.dig sc '.networkPolicies.global.scIngress.ips | . style="flow"')" "[0.0.0.0/32]"
assert_equal "$(yq.dig sc '.networkPolicies.global.wcIngress.ips | . style="flow"')" "[0.0.0.0/32]"
}

@test "ck8s update-ips performs minimal run with zero diff" {
update_ips.mock_minimal
update_ips.populate_minimal
Expand Down

0 comments on commit ba83dde

Please sign in to comment.