Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Commit 9bf757e

Browse files
committed
DNM: add zuul vyos testing
This is an example job to start testing vyos Depends-On: ansible/ansible-zuul-jobs#34 Signed-off-by: Paul Belanger <[email protected]>
1 parent 58b40c9 commit 9bf757e

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

.zuul.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- job:
2+
name: network-vyos-test
3+
parent: ansible-network-vyos-base
4+
run: tests/foo.yaml
5+
6+
- project:
7+
check:
8+
jobs:
9+
- network-vyos-test

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ansible>=2.4.0

tests/foo.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
- hosts: controller
2+
tasks:
3+
- name: Bootstrap tox environment
4+
args:
5+
chdir: ~/src/github.com/ansible/network
6+
shell: tox -v -evenv --notest
7+
8+
- name: Run ansible tests
9+
args:
10+
chdir: ~/src/github.com/ansible/network
11+
shell: .tox/venv/bin/ansible-playbook -v -c network_cli tests/vyos/modules/interfaces/main.yaml

tests/vyos/modules/interfaces/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- net_configuration_interfaces
66
tasks:
77
- import_role:
8-
name: ~/collections/network
8+
name: network
99

1010
- include_tasks: "{{ item }}.yaml"
1111
loop:

tox.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ envlist = linters
66
[testenv]
77
basepython = python3
88
install_command = pip install {opts} {packages}
9-
deps = -r{toxinidir}/test-requirements.txt
9+
deps = -r{toxinidir}/requirements.txt
10+
-r{toxinidir}/test-requirements.txt
1011

1112
[testenv:linters]
1213
basepython = python3
@@ -15,6 +16,8 @@ commands =
1516
flake8 {posargs}
1617

1718
[testenv:venv]
19+
setenv =
20+
ANSIBLE_ROLES_PATH = ..
1821
basepython = python3
1922
commands = {posargs}
2023

0 commit comments

Comments
 (0)