test-220-stretch-pub-and-cluster.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env bash
  2. set -xeuo pipefail
  3. CONFFILE="stretch-pub-and-cluster.yaml"
  4. NAMESPACE='stretch-pub-and-cluster'
  5. OUTFILE="stretch-pub-and-cluster-test.log"
  6. kubectl create namespace "$NAMESPACE"
  7. sed \
  8. -e "s|namespace:.*|namespace: $NAMESPACE|" \
  9. -e 's|publicNetwork:.*|publicNetwork: "default/public-net"|' \
  10. -e 's|clusterNetwork:.*|clusterNetwork: "default/cluster-net"|' \
  11. tests/scripts/multus/stretch.yaml >"$CONFFILE"
  12. cat "$CONFFILE"
  13. ./rook --log-level DEBUG multus validation run --config "$CONFFILE" 2>&1 | tee "$OUTFILE"
  14. # 3 node types:
  15. # arbiter-node (1 node, on control-plane)
  16. grep 'starting 0 osd validation clients for node type "arbiter-node"' "$OUTFILE"
  17. grep 'starting 1 other (non-OSD) validation clients for node type "arbiter-node"' "$OUTFILE"
  18. # storage-nodes (2 nodes)
  19. grep 'starting 2 osd validation clients for node type "storage-nodes"' "$OUTFILE"
  20. grep 'starting 3 other (non-OSD) validation clients for node type "storage-nodes"' "$OUTFILE"
  21. # worker-nodes (1 node)
  22. grep 'starting 0 osd validation clients for node type "worker-nodes"' "$OUTFILE"
  23. grep 'starting 2 other (non-OSD) validation clients for node type "worker-nodes"' "$OUTFILE"
  24. # total
  25. grep "all 13 clients are 'Ready'" "$OUTFILE"
  26. # should be no non-terminating resources in namespace after successful test
  27. [[ -z "$(kubectl --namespace "$NAMESPACE" get pods --no-headers 2>/dev/null | grep -v Terminating)" ]]