mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-28 13:33:57 +00:00
commit
72cc26a568
5 changed files with 7 additions and 3 deletions
1
tests/playbooks/roles
Symbolic link
1
tests/playbooks/roles
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../roles/
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
command: yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
|
||||
args:
|
||||
warn: false
|
||||
creates: /etc/yum.repos.d/epel.repo
|
||||
when:
|
||||
- ansible_distribution in ['RedHat', 'CentOS']
|
||||
- ansible_distribution_major_version in ['6', '7']
|
||||
|
|
@ -34,7 +35,7 @@
|
|||
local_follow: false
|
||||
loop:
|
||||
- ../library/network_connections.py
|
||||
- test_network_connections.py
|
||||
- unit/test_network_connections.py
|
||||
- ../module_utils/network_lsr
|
||||
|
||||
- name: Create helpers directory
|
||||
|
|
@ -48,12 +49,13 @@
|
|||
dest: /tmp/test-unit-1/helpers
|
||||
mode: 0755
|
||||
with_fileglob:
|
||||
- helpers/*
|
||||
- unit/helpers/*
|
||||
|
||||
- name: Check if python2 is available
|
||||
command: python2 --version
|
||||
ignore_errors: true
|
||||
register: python2_available
|
||||
when: true
|
||||
|
||||
- name: Run python2 unit tests
|
||||
command: python2 /tmp/test-unit-1/test_network_connections.py --verbose
|
||||
|
|
@ -64,6 +66,7 @@
|
|||
command: python3 --version
|
||||
ignore_errors: true
|
||||
register: python3_available
|
||||
when: true
|
||||
|
||||
- name: Run python3 unit tests
|
||||
command: python3 /tmp/test-unit-1/test_network_connections.py --verbose
|
||||
|
|
|
|||
2
tox.ini
2
tox.ini
|
|
@ -116,7 +116,7 @@ commands =
|
|||
{posargs} \
|
||||
library/network_connections.py \
|
||||
module_utils/network_lsr \
|
||||
tests/test_network_connections.py
|
||||
tests/unit/test_network_connections.py
|
||||
|
||||
[testenv:flake8]
|
||||
basepython = python2.7
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue