321_many_connections_2_test.sh 582 B

12345678910111213141516171819202122232425262728
  1. #! /bin/bash
  2. # shellcheck disable=SC1091
  3. . ./config.sh
  4. start_suite "Test short lived connections between containers on different hosts"
  5. weave_on "$HOST1" launch "$HOST1" "$HOST2"
  6. weave_on "$HOST2" launch "$HOST1" "$HOST2"
  7. scope_on "$HOST1" launch
  8. scope_on "$HOST2" launch
  9. server_on "$HOST1"
  10. client_on "$HOST2"
  11. sleep 30 # need to allow the scopes to poll dns, resolve the other app ids, and send them reports
  12. check() {
  13. has_container "$1" nginx
  14. has_container "$1" client
  15. has_connection containers "$1" client nginx
  16. }
  17. check "$HOST1"
  18. check "$HOST2"
  19. scope_end_suite