Skip to content

Commit

Permalink
Add simple test for bridges
Browse files Browse the repository at this point in the history
  • Loading branch information
tyll committed May 25, 2018
1 parent 0287dca commit e984e9b
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions tests/tests_bridge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# SPDX-License-Identifier: BSD-3-Clause
---
- name: Test configuring bridges
hosts: all
vars:
interface: LSR-TST-br31

tasks:
- name: "set interface={{ interface }}"
set_fact:
interface: "{{ interface }}"
- include_tasks: tasks/show-interfaces.yml
- include_tasks: tasks/assert-device_absent.yml

- name: Add test bridge
hosts: all
vars:
network_connections:
- name: "{{ interface }}"
interface_name: "{{ interface }}"
state: up
type: bridge
ip:
dhcp4: no
auto6: yes
roles:
- linux-system-roles.network

- import_playbook: run-tasks.yml
vars:
task: tasks/assert-device_present.yml

- import_playbook: down-profile.yml
vars:
profile: "{{ interface }}"
# FIXME: assert profile/device down

- import_playbook: remove-profile.yml
vars:
profile: "{{ interface }}"
# FIXME: assert profile absent

- import_playbook: run-tasks.yml
vars:
task: tasks/assert-device_absent.yml

0 comments on commit e984e9b

Please sign in to comment.