fids/testing/catcher/tests/create-flight.test.yaml

23 lines
708 B
YAML

variables:
site_url: '{{ browser }}'
code: 'VWJ367'
steps:
- selenium:
test:
driver: '/usr/lib/chromedriver'
file: resources/create-flight.js
register: {title: '{{ OUTPUT.title }}'}
- echo: {from: '{{ title }}', to: variable.output}
- postgres:
request:
conf: '{{ postgres_flights }}'
sql: "select count(*) from flights where flight_code = '{{ code }}'"
register: {count: '{{ OUTPUT.count }}'}
- check:
equals: {the: 1, is: '{{ count }}'}
finally:
- postgres:
request:
conf: '{{ postgres_flights }}'
sql: "delete from flights where flight_code = '{{ code }}'"