File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,14 @@ jobs:
150150 for i in {1..5}
151151 do
152152 OUTPUT_JSON=`otterize network-mapper export --telemetry-enabled=false -n otterize-tutorial-kafka-mapping --format=json`
153- if [ `echo "$OUTPUT_JSON" | jq ". | length"` != 2 ] || [ `echo "$OUTPUT_JSON" | jq '[.[] | select(.spec.targets[] | has("kafka"))] | length'` != 2 ] ; then
153+
154+ if \
155+ # Check that the output had 2 records (for client & client2)
156+ [ `echo "$OUTPUT_JSON" | jq ". | length"` != 2 ] || \
157+ # Check that both has kafka defined
158+ [ `echo "$OUTPUT_JSON" | jq '[.[] | select(.spec.targets[] | has("kafka"))] | length'` != 2 ] \
159+ # Check that both has have 2 operations for kafka
160+ [ `echo "$OUTPUT_JSON" | jq '[.[] | .spec.targets[] | select(has("kafka")) | select(.kafka.topics[0].operations | length != 2)] | length'` != 0 ] ; then
154161 echo "wait for discovered intents";
155162 echo _SNIFFER LOGS_
156163 kubectl logs --since=15s -n otterize-system -l app=otterize-network-sniffer
You can’t perform that action at this time.
0 commit comments