diff --git a/.zuul.d/jobs.yaml b/.zuul.d/jobs.yaml index 307d8469..4ae3b808 100644 --- a/.zuul.d/jobs.yaml +++ b/.zuul.d/jobs.yaml @@ -49,3 +49,12 @@ ARA API clients as well as the API itself. run: tests/with_mysql.yaml post-run: tests/zuul_post_with_mysql.yaml + +- job: + name: ara-api-distributed-sqlite + parent: ara-api-database-backends + nodeset: ara-multinode + description: | + Deploys the ARA API server on Ubuntu 18.04 as well as Fedora 30 and + tests it using the distributed sqlite database backend. + run: tests/with_distributed_sqlite.yaml diff --git a/.zuul.d/nodesets.yaml b/.zuul.d/nodesets.yaml index d286eab8..a7fa18ba 100644 --- a/.zuul.d/nodesets.yaml +++ b/.zuul.d/nodesets.yaml @@ -17,3 +17,18 @@ nodes: - ubuntu-bionic - fedora-30 + +# Nodeset used to test instances of ARA API deployed on different operating +# systems simultaneously. +- nodeset: + name: ara-multinode + nodes: + - name: ubuntu-bionic + label: ubuntu-bionic + - name: fedora-30 + label: fedora-30 + groups: + - name: ara-api-server + nodes: + - ubuntu-bionic + - fedora-30 diff --git a/.zuul.d/project.yaml b/.zuul.d/project.yaml index 44cf6a78..307cd573 100644 --- a/.zuul.d/project.yaml +++ b/.zuul.d/project.yaml @@ -5,13 +5,13 @@ - docs-on-readthedocs check: jobs: + - ara-api-distributed-sqlite - ara-api-mysql - ara-api-postgresql - ansible-role-ara-api-fedora-devel - ansible-role-ara-api-fedora-2.9 - ansible-role-ara-api-ubuntu-2.8 - ansible-role-ara-api-ubuntu-2.7 - - ansible-role-ara-api-fedora-distributed-sqlite - ansible-role-ara-api-fedora-packages: voting: false - ansible-role-ara-web-ubuntu @@ -21,13 +21,13 @@ - ara-tox-py3 gate: jobs: + - ara-api-distributed-sqlite - ara-api-mysql - ara-api-postgresql - ansible-role-ara-api-fedora-devel - ansible-role-ara-api-fedora-2.9 - ansible-role-ara-api-ubuntu-2.8 - ansible-role-ara-api-ubuntu-2.7 - - ansible-role-ara-api-fedora-distributed-sqlite - ansible-role-ara-web-ubuntu - ansible-role-ara-web-fedora - ara-basic-ansible-integration diff --git a/.zuul.d/role-jobs.yaml b/.zuul.d/role-jobs.yaml index ac2eeceb..80488c31 100644 --- a/.zuul.d/role-jobs.yaml +++ b/.zuul.d/role-jobs.yaml @@ -74,14 +74,6 @@ - name: github.com/ansible/ansible override-checkout: stable-2.7 -# Database server jobs -- job: - name: ansible-role-ara-api-fedora-distributed-sqlite - parent: ansible-role-ara-api-fedora - roles: - - zuul: zuul/zuul-jobs - run: tests/with_distributed_sqlite.yaml - # Distribution package tests - job: diff --git a/tests/vars/distributed_sqlite_tests.yaml b/tests/vars/distributed_sqlite_tests.yaml new file mode 100644 index 00000000..cac3284e --- /dev/null +++ b/tests/vars/distributed_sqlite_tests.yaml @@ -0,0 +1,14 @@ +ara_tests_cleanup: true +ara_api_root_dir: "{{ ansible_user_dir }}/.ara-tests" +ara_api_distributed_sqlite_root: "{{ ansible_user_dir }}/.ara-tests" +ara_api_distributed_sqlite_prefix: ara-test-report +ara_api_wsgi_server: gunicorn +ara_api_secret_key: testing +ara_api_debug: true +ara_api_log_level: DEBUG +ara_api_server: "http://127.0.0.1:8000" +ara_api_client: http +_test_directories: + - "tests/some/path/ara-test-report" + - "tests/dev/ara-test-report" + - "tests/prod/ara-test-report" diff --git a/tests/with_distributed_sqlite.yaml b/tests/with_distributed_sqlite.yaml index 4b801b05..f49c4830 100644 --- a/tests/with_distributed_sqlite.yaml +++ b/tests/with_distributed_sqlite.yaml @@ -18,21 +18,8 @@ - name: Test the ARA API with the distributed sqlite backend hosts: all gather_facts: yes - vars: - ara_tests_cleanup: true - ara_api_root_dir: "{{ ansible_user_dir }}/.ara-tests" - ara_api_distributed_sqlite_root: "{{ ansible_user_dir }}/.ara-tests" - ara_api_distributed_sqlite_prefix: ara-test-report - ara_api_wsgi_server: gunicorn - ara_api_secret_key: testing - ara_api_debug: true - ara_api_log_level: DEBUG - ara_api_server: "http://127.0.0.1:8000" - ara_api_client: http - _test_directories: - - "tests/some/path/ara-test-report" - - "tests/dev/ara-test-report" - - "tests/prod/ara-test-report" + vars_files: + - vars/distributed_sqlite_tests.yaml tasks: # Generate ourselves a fresh database to run tests with - name: Set up the API with the default sqlite backend