Add api test to both environments

This commit is contained in:
Emmanouil Kampitakis 2019-04-08 21:34:31 +02:00
parent 3daaeb213d
commit 0b606fcc31
2 changed files with 22 additions and 0 deletions

View file

@ -1,6 +1,17 @@
---
- hosts: all
become: true
tasks:
- name: Check if the api returns the correct version
uri:
url: "http://localhost:8008/_matrix/federation/v1/version"
return_content: true
register: api_version
- name: Check returned api version
fail: >
Return value is not as expected {{ api_version }}
when: matrix_synapse_version != "v"~(api_version.content | from_json).server.version
vars:
dbname: synapse
dbuser: synapse_user

View file

@ -5,6 +5,17 @@
dbname: synapse
dbuser: synapse_user
dbpw: synapse_password
tasks:
- name: Check if the api returns the correct version
uri:
url: "http://localhost:8008/_matrix/federation/v1/version"
return_content: true
register: api_version
- name: Check returned api version
fail: >
Return value is not as expected {{ api_version }}
when: matrix_synapse_version != "v"~(api_version.content | from_json).server.version
roles:
- role: geerlingguy.pip
- role: geerlingguy.postgresql