312_container_to_container_edge_same_netns_test.sh 561 B

12345678910111213141516171819202122
  1. #! /bin/bash
  2. # shellcheck disable=SC1091
  3. . ./config.sh
  4. start_suite "Test short lived connection between containers in same network namespace"
  5. scope_on "$HOST1" launch
  6. docker_on "$HOST1" run -d --name nginx nginx
  7. docker_on "$HOST1" run -d --net=container:nginx --name client albanc/dialer /go/bin/dialer connectshortlived 127.0.0.1:80
  8. wait_for_containers "$HOST1" 60 nginx client
  9. has_container "$HOST1" nginx
  10. has_container "$HOST1" client
  11. list_containers "$HOST1"
  12. list_connections "$HOST1"
  13. has_connection containers "$HOST1" client nginx
  14. scope_end_suite