diff --git a/k8s-node-termination-handler/test/jsonnetfile.json b/k8s-node-termination-handler/test/jsonnetfile.json new file mode 100644 index 000000000..79cb41ce7 --- /dev/null +++ b/k8s-node-termination-handler/test/jsonnetfile.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "dependencies": [ + { + "source": { + "git": { + "remote": "https://github.com/grafana/jsonnet-libs", + "subdir": "ksonnet-util" + } + }, + "version": "master" + } + ], + "legacyImports": true +} diff --git a/k8s-node-termination-handler/test/test.jsonnet b/k8s-node-termination-handler/test/test.jsonnet new file mode 100644 index 000000000..3686419f8 --- /dev/null +++ b/k8s-node-termination-handler/test/test.jsonnet @@ -0,0 +1,7 @@ +{ + local handler = import '../handler.libsonnet', + handler: handler.new({ + namespace: 'kube-system', + slack_webhook: 'http://hook.slack.com/AAABBBCCC1112222333/', + }), +} diff --git a/k8s-node-termination-handler/test/test.sh b/k8s-node-termination-handler/test/test.sh new file mode 100755 index 000000000..e60226465 --- /dev/null +++ b/k8s-node-termination-handler/test/test.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +DIR=$(dirname $0) + +cd $DIR +jb install +jsonnet -J vendor test.jsonnet +cd - > /dev/null