Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,17 @@ jobs:
run: |-
# wait for 2 intents to be discovered with timeout of 30 seconds.
# sleeps 10 because this is the report interval from the watcher to the mapper
for i in {1..5}
for i in {1..10}
do
OUTPUT_JSON=`otterize network-mapper export --telemetry-enabled=false -n otterize-tutorial-kafka-mapping --format=json`
if [ `echo "$OUTPUT_JSON" | jq ". | length"` != 2 ] || [ `echo "$OUTPUT_JSON" | jq '[.[] | select(.spec.targets[] | has("kafka"))] | length'` != 2 ] ; then
# Check for muber of items, should expect 2 - client & client2
NUM_ITEMS=$(echo "$OUTPUT_JSON" | jq '. | length')
# Number of kafka items
NUM_OF_KAFKA_TARGETS=$(echo "$OUTPUT_JSON" | jq '[.[] | select(.spec.targets[] | has("kafka"))] | length')
# Number of correct operations - records with 2 kafka operations
ITEMS_WITH_CORRECT_OPERATIONS=$(echo "$OUTPUT_JSON" | jq '[.[] | .spec.targets[] | select(has("kafka")) | select(.kafka.topics[0].operations | length == 2)] | length')

if [ "$NUM_ITEMS" != 2 ] || [ "$NUM_OF_KAFKA_TARGETS" != 2 ] || [ "$ITEMS_WITH_CORRECT_OPERATIONS" != 2 ]; then
echo "wait for discovered intents";
echo _SNIFFER LOGS_
kubectl logs --since=15s -n otterize-system -l app=otterize-network-sniffer
Expand Down
Loading