Skip to content

Commit 904eff7

Browse files
committed
feat: integration tests for networkpolicies
Signed-off-by: Kimonas Sotirchos <[email protected]>
1 parent 6b41b80 commit 904eff7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

testing/shared/test_service.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ case "$OPERATION" in
3939
-H "kubeflow-userid: test-user" \
4040
"http://localhost:${PORT}/api/workgroup/exists" \
4141
>/dev/null 2>&1
42+
43+
# test the NetworkPolicy, by ensuring other Pods timeout talking to the dashboard
44+
OUTPUT=$(kubectl run \
45+
netshoot-test --rm -i \
46+
--restart=Never \
47+
--image nicolaka/netshoot \
48+
-- curl -s dashboard.kubeflow.svc --connect-timeout 5 \
49+
2>&1)
50+
echo $OUTPUT | grep "Connection timed out after"
4251
;;
4352

4453
"test-kfam")

0 commit comments

Comments
 (0)