Skip to content

Instantly share code, notes, and snippets.

@petermd
Last active February 12, 2016 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petermd/1f1d8d5c7bd87a2a1a8d to your computer and use it in GitHub Desktop.
Save petermd/1f1d8d5c7bd87a2a1a8d to your computer and use it in GitHub Desktop.
#!/bin/bash
PASS_OPS=${KC_MOCK_PASS:-none}
FAIL_OPS=${KC_MOCK_FAIL:-none}
if [[ $FAIL_OPS == *"$1"* ]]; then
>&2 echo "$0: mock-fail" "$@"
exit 1
elif [[ $PASS_OPS == *"$1"* ]]; then
>&2 echo "$0: mock-pass" "$@"
exit 0
else
>&2 echo "$0: exec '$1'"
kubectl "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment