340_process_edge_across_host_2_test.sh 719 B

12345678910111213141516171819202122232425262728293031
  1. #! /bin/bash
  2. # shellcheck disable=SC1091
  3. . ./config.sh
  4. start_suite "Test long connections between processes 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. weave_proxy_on "$HOST2" run -dti --name client alpine /bin/sh -c "while true; do \
  11. nc nginx.weave.local 80 || true; \
  12. sleep 1; \
  13. done"
  14. sleep 30 # need to allow the scopes to poll dns, resolve the other app ids, and send them reports
  15. check() {
  16. has processes "$1" "nginx: worker process"
  17. has processes "$1" nc
  18. has_connection processes "$1" nc "nginx: worker process"
  19. }
  20. check "$HOST1"
  21. check "$HOST2"
  22. scope_end_suite