smokeping_prober-helm/playbooks/functional/run.yaml
Mohammed Naser 2a095fac7c Added functional tests
Change-Id: I9a07147e1bc2c79b4ff5773bf5c2d4a44cfc694a
2020-03-29 15:57:10 -04:00

23 lines
676 B
YAML

- hosts: all
roles:
- role: helm-template
vars:
helm_release_name: smokeping-prober
helm_chart: ./charts/smokeping-prober
tasks:
- name: Get the port
command: >
kubectl get svc/smokeping-prober -ojsonpath="http://{.spec.clusterIP}:{.spec.ports[0].port}"
register: _url
- name: Wait for a few seconds for the prober to gather data
pause:
seconds: 10
- name: Get data back from the prober
uri:
url: "{{ _url.stdout }}/metrics"
return_content: true
register: _probe
failed_when: "'smokeping_response_duration_seconds_bucket{host=\"localhost\"' not in _probe.content"