aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStaffan Olsson <staffan@repos.se>2017-07-28 20:22:59 +0200
committerStaffan Olsson <staffan@repos.se>2017-07-28 20:42:43 +0200
commit24c43d2119577470790d8e489d76c56e33088e03 (patch)
tree49218930cb9e34bacf616f0301fe15ca989d3cca
parentc7eae1b9717dd9b031b3b585ce9a4d518b2fef7d (diff)
downloadkubernetes-kafka-24c43d2119577470790d8e489d76c56e33088e03.tar.gz
kubernetes-kafka-24c43d2119577470790d8e489d76c56e33088e03.tar.bz2
kubernetes-kafka-24c43d2119577470790d8e489d76c56e33088e03.zip
Working boilerplate, with output to kubectl logs
-rw-r--r--test/basic-produce-consume.yml22
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