Commit 23e1d240 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Test Ryu-OpenFlow:

- Fixed ping tests in gitlab-ci to report result of ping
parent 695ba07a
Loading
Loading
Loading
Loading
+60 −60
Original line number Original line Diff line number Diff line
@@ -255,18 +255,18 @@ end2end_test ryu-openflow:
    - docker exec mininet ovs-ofctl dump-flows s5
    - docker exec mininet ovs-ofctl dump-flows s5


    # Run end-to-end test: test no connectivity with ping
    # Run end-to-end test: test no connectivity with ping
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h3&count=3' | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h1&count=3' | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'


    # Run end-to-end test: configure IETF L3VPN service between h1-h3
    # Run end-to-end test: configure IETF L3VPN service between h1-h3
    - >
    - >
@@ -284,18 +284,18 @@ end2end_test ryu-openflow:
    - docker exec mininet ovs-ofctl dump-flows s5
    - docker exec mininet ovs-ofctl dump-flows s5


    # Run end-to-end test: test connectivity with ping (h1-h3 should work, rest should not work)
    # Run end-to-end test: test connectivity with ping (h1-h3 should work, rest should not work)
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h3&count=3' | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h4&count=3' | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h1&count=3' | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h2&count=3' | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'


    # Run end-to-end test: configure IETF L3VPN service between h2-h4
    # Run end-to-end test: configure IETF L3VPN service between h2-h4
    - >
    - >
@@ -313,18 +313,18 @@ end2end_test ryu-openflow:
    - docker exec mininet ovs-ofctl dump-flows s5
    - docker exec mininet ovs-ofctl dump-flows s5


    # Run end-to-end test: test connectivity with ping (h1-h3 should work, h2-h4 should work, rest should not work)
    # Run end-to-end test: test connectivity with ping (h1-h3 should work, h2-h4 should work, rest should not work)
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h4&count=3' | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h2&count=3' | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 3 received, 0\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'


    # Run end-to-end test: deconfigure IETF L3VPN service h1-h3
    # Run end-to-end test: deconfigure IETF L3VPN service h1-h3
    - >
    - >
@@ -342,18 +342,18 @@ end2end_test ryu-openflow:
    - docker exec mininet ovs-ofctl dump-flows s5
    - docker exec mininet ovs-ofctl dump-flows s5


    # Run end-to-end test: test connectivity with ping (h2-h4 should work, rest should not work)
    # Run end-to-end test: test connectivity with ping (h2-h4 should work, rest should not work)
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'


    # Run end-to-end test: deconfigure IETF L3VPN service h2-h4
    # Run end-to-end test: deconfigure IETF L3VPN service h2-h4
    - >
    - >
@@ -371,18 +371,18 @@ end2end_test ryu-openflow:
    - docker exec mininet ovs-ofctl dump-flows s5
    - docker exec mininet ovs-ofctl dump-flows s5


    # Run end-to-end test: test no connectivity with ping
    # Run end-to-end test: test no connectivity with ping
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h1&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h2&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h4&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h3&target=h4&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h1&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h1&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h2&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h2&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h3&count=3' | grep -E '3 packets transmitted, 0 received, 100\% packet loss'
    - curl -s 'http://172.254.252.11:5000/ping?source=h4&target=h3&count=3' | tee /dev/stderr | grep -E '3 packets transmitted, 0 received, 100\% packet loss'


    # Run end-to-end test: cleanup scenario
    # Run end-to-end test: cleanup scenario
    - >
    - >