diff options
author | Staffan Olsson <staffan@repos.se> | 2017-07-28 20:22:59 +0200 |
---|---|---|
committer | Staffan Olsson <staffan@repos.se> | 2017-07-28 20:42:43 +0200 |
commit | 24c43d2119577470790d8e489d76c56e33088e03 (patch) | |
tree | 49218930cb9e34bacf616f0301fe15ca989d3cca /test | |
parent | c7eae1b9717dd9b031b3b585ce9a4d518b2fef7d (diff) | |
download | kubernetes-kafka-24c43d2119577470790d8e489d76c56e33088e03.tar.gz kubernetes-kafka-24c43d2119577470790d8e489d76c56e33088e03.tar.bz2 kubernetes-kafka-24c43d2119577470790d8e489d76c56e33088e03.zip |
Working boilerplate, with output to kubectl logs
Diffstat (limited to 'test')
-rw-r--r-- | test/basic-produce-consume.yml | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/test/basic-produce-consume.yml b/test/basic-produce-consume.yml index 37ee807..39208e0 100644 --- a/test/basic-produce-consume.yml +++ b/test/basic-produce-consume.yml @@ -6,11 +6,17 @@ metadata: apiVersion: v1 data: - live.sh: |- + setup.sh: |- + touch /tmp/testlog + tail -f /tmp/testlog + + continue.sh: |- exit 0 run.sh: |- - echo "Test is up" + exec >> /tmp/testlog + exec 2>&1 + echo "Test completed at $(date -u +%Y-%m-%dT%H:%M:%SZ)." exit 0 --- @@ -30,6 +36,7 @@ spec: - --zookeeper - zookeeper.kafka.svc.cluster.local:2181 - --create + - --if-not-exists - --topic - test-basic-produce-consume - --partitions @@ -64,21 +71,20 @@ spec: value: zookeeper.kafka.svc.cluster.local:2181 # Test set up command: - - tail - - -f - - /dev/null - # Test run + - /bin/bash + - /test/setup.sh + # Test run, again and again readinessProbe: exec: command: - /bin/bash - /test/run.sh - # Test restart on nonzero exit + # Test quit on nonzero exit livenessProbe: exec: command: - /bin/bash - - /test/live.sh + - /test/continue.sh volumeMounts: - name: config mountPath: /test |