-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from openwisp/molecule
[qa] Switch to molecule
- Loading branch information
Showing
14 changed files
with
150 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
rulesdir: | ||
- /home/travis/galaxy/rules | ||
skip_list: | ||
- '204' | ||
- '301' | ||
- '303' | ||
- '306' | ||
- '403' | ||
exclude_paths: | ||
- /home/travis/.ansible/roles/Stouts.postfix/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
|
||
extends: default | ||
rules: | ||
line-length: | ||
max: 160 | ||
level: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
|
||
- name: Converge | ||
hosts: all | ||
become: true | ||
|
||
vars: | ||
openwisp2_network_topology: true | ||
|
||
pre_tasks: | ||
- name: Update apt cache. | ||
apt: update_cache=true cache_valid_time=600 | ||
when: ansible_os_family == 'Debian' | ||
|
||
- name: Remove the .dockerenv file | ||
file: | ||
path: /.dockerenv | ||
state: absent | ||
|
||
roles: | ||
- role: openwisp.openwisp2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
|
||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
lint: | | ||
set -e | ||
# yamllint . | ||
ansible-lint | ||
platforms: | ||
- name: "${ROLE_NAME:-instance}-${MOLECULE_DISTRO}" | ||
image: "geerlingguy/docker-${MOLECULE_DISTRO}-ansible:${tag:-latest}" | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
playbooks: | ||
converge: ${MOLECULE_PLAYBOOK:-converge.yml} | ||
config_options: | ||
defaults: | ||
stdout_callback: yaml | ||
bin_ansible_callbacks: yes | ||
verifier: | ||
name: ansible |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
|
||
- name: Verify | ||
hosts: all | ||
become: yes | ||
gather_facts: no | ||
|
||
tasks: | ||
- name: Run a specific subset of tests | ||
command: > | ||
/opt/openwisp2/env/bin/python /opt/openwisp2/manage.py test --keepdb \ | ||
openwisp_controller.pki \ | ||
openwisp_controller.config.tests.test_config \ | ||
openwisp_controller.config.tests.test_controller \ | ||
openwisp_controller.config.tests.test_device \ | ||
openwisp_controller.config.tests.test_tag \ | ||
openwisp_controller.config.tests.test_template \ | ||
openwisp_controller.config.tests.test_views \ | ||
openwisp_controller.config.tests.test_vpn \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_preview_device \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_device_preview_button \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_template_preview_button \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_vpn_preview_button \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_device_queryset \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_device_organization_fk_queryset \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_device_organization_fk_queryset \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_device_templates_m2m_queryset \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_template_queryset \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_template_organization_fk_queryset \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_template_vpn_fk_queryset \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_vpn_queryset \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_vpn_organization_fk_queryset \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_vpn_ca_fk_queryset \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_vpn_cert_fk_queryset \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_changelist_recover_deleted_button \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_recoverlist_operator_403 \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_device_template_filter \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_device_contains_default_templates_js \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_template_not_contains_default_templates_js \ | ||
openwisp_controller.config.tests.test_admin.TestAdmin.test_vpn_not_contains_default_templates_js \ | ||
openwisp_controller.geo.tests.test_api | ||
changed_when: false | ||
|
||
- name: Check if redis-server is running | ||
command: systemctl status redis-server | ||
changed_when: false | ||
|
||
- name: Chcke if redis is running | ||
command: systemctl status redis | ||
changed_when: false | ||
|
||
- name: Ceck Openwisp | ||
block: | ||
- name: Check if OpenWISP is running | ||
uri: | ||
url: "https://{{ inventory_hostname }}/admin/login/?next=/admin/" | ||
validate_certs: false | ||
rescue: | ||
- name: Get OpenWisp log | ||
command: "tail -n 500 {{ openwisp2_path }}/log/*.log" | ||
register: openwisp_log | ||
|
||
- name: Show OpenWisp log | ||
debug: | ||
var: openwisp_log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.