test-230-stretch-pub-only.sh 1.4 KB

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