-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #322 from jingyuanliang/caliwd
Handle RUN_CNI_WATCHDOG from all exit paths
- Loading branch information
Showing
3 changed files
with
98 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export KUBERNETES_SERVICE_HOST=kubernetes.default.svc | ||
export KUBERNETES_SERVICE_PORT=443 | ||
|
||
export ENABLE_CALICO_NETWORK_POLICY=true | ||
export ENABLE_BANDWIDTH_PLUGIN=false | ||
export ENABLE_CILIUM_PLUGIN=false | ||
export ENABLE_MASQUERADE=false | ||
export ENABLE_IPV6=false | ||
|
||
CNI_SPEC_TEMPLATE=$(cat testdata/spec-template.json) | ||
export CNI_SPEC_TEMPLATE | ||
|
||
function before_test() { | ||
true | ||
} | ||
|
||
function verify() { | ||
local actual | ||
|
||
if [[ -f "/host/etc/cni/net.d/${CNI_SPEC_NAME}" ]]; then | ||
actual=$(jq -S . <"/host/etc/cni/net.d/${CNI_SPEC_NAME}") | ||
echo "Expected CNI config to be missing, but it has:" | ||
echo "$actual" | ||
return 1 | ||
fi | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export KUBERNETES_SERVICE_HOST=kubernetes.default.svc | ||
export KUBERNETES_SERVICE_PORT=443 | ||
|
||
export ENABLE_CALICO_NETWORK_POLICY=true | ||
export ENABLE_BANDWIDTH_PLUGIN=false | ||
export ENABLE_CILIUM_PLUGIN=false | ||
export ENABLE_MASQUERADE=false | ||
export ENABLE_IPV6=false | ||
export RUN_CNI_WATCHDOG=true | ||
|
||
CNI_SPEC_TEMPLATE=$(cat testdata/spec-template.json) | ||
export CNI_SPEC_TEMPLATE | ||
|
||
# shellcheck disable=SC2034 | ||
TEST_WANT_EXIT_CODE=${TEST_EXIT_CODE_SLEEP} | ||
|
||
function before_test() { | ||
true | ||
} | ||
|
||
function verify() { | ||
local actual | ||
|
||
if [[ -f "/host/etc/cni/net.d/${CNI_SPEC_NAME}" ]]; then | ||
actual=$(jq -S . <"/host/etc/cni/net.d/${CNI_SPEC_NAME}") | ||
echo "Expected CNI config to be missing, but it has:" | ||
echo "$actual" | ||
return 1 | ||
fi | ||
|
||
} |