Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configurable egress for server network policy #389

Merged
merged 6 commits into from
Dec 16, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test for networkpolicy egress in server
  • Loading branch information
corest committed Sep 18, 2020
commit d8ddb7ec05d164542fa24c7d081fa524aff9e5f8
11 changes: 11 additions & 0 deletions test/unit/server-network-policy.bats
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,14 @@ load _helpers
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "true" ]
}

@test "server/network-policy: egress enabled by server.networkPolicy.egress" {
cd `chart_dir`
local actual=$(helm template \
--set 'server.networkPolicy.enabled=true' \
--set 'server.networkPolicy.egress=true' \
--show-only templates/server-network-policy.yaml \
. | tee /dev/stderr |
yq -r '.spec.egress[0]' | tee /dev/stderr)
[ "${actual}" = "{}" ]
}