diff options
Diffstat (limited to 'build/test/playbook-test.yml')
-rw-r--r-- | build/test/playbook-test.yml | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/build/test/playbook-test.yml b/build/test/playbook-test.yml index b0e2c10..82df8ce 100644 --- a/build/test/playbook-test.yml +++ b/build/test/playbook-test.yml @@ -11,6 +11,17 @@ links: [ "nms-front-test:nms-front" ] - name: "nms-collector-test" links: [ "nms-db-test:db" ] + - simple_urls: + - "/api/public/switches" + - "/api/public/switch-state" + - "/api/public/ping" + - "/api/public/location" + - "/api/public/dhcp" + - "/api/public/dhcp-summary" + - read_urls: + - "/api/read/comments" + - "/api/read/snmp" + - "/api/read/switches-management" tasks: - name: make all @@ -18,8 +29,8 @@ state: build name: "{{ item.name }}" docker_api_version: 1.18 - dockerfile: test/{{ item.name }}.Dockerfile - path: "src/tgnms/build/" + dockerfile: build/test/{{ item.name }}.Dockerfile + path: "src/tgnms/" with_items: "{{ images }}" - name: stop all @@ -28,6 +39,7 @@ state: stopped image: "{{ item.name }}" docker_api_version: 1.18 + stop_timeout: 2 with_items: "{{ images }}" - name: start all @@ -40,4 +52,26 @@ links: "{{ item.links }}" with_items: "{{ images }}" + - name: workaround to get nms-varnish-front-ip + shell: "docker inspect nms-varnish-test | grep IPAddress | sed 's/[^0-9.]//g'" + register: ip + - name: Display IP + debug: + msg: "Front is available at http://{{ ip.stdout }}/" + + - name: test index + uri: url="http://{{ ip.stdout }}/" + + - name: test public api without data + uri: + url: "http://{{ ip.stdout }}{{ item }}" + with_items: "{{ simple_urls }}" + + - name: test read api without data + uri: + url: http://{{ ip.stdout }}{{ item }} + user: demo + password: demo + with_items: "{{ read_urls }}" + |