ansible/test/integration/targets/openvswitch_db/tests/basic.yaml

92 lines
1.6 KiB
YAML
Raw Normal View History

---
- name: Make sure test bridge does not exist before tests
command: ovs-vsctl del-br br-test
ignore_errors: yes
- name: Create test bridge
command: ovs-vsctl add-br br-test
- name: Create bridge
openvswitch_db:
table: Bridge
record: br-test
col: other_config
key: disable-in-band
value: true
register: result
- assert:
that:
- "result.changed == true"
- name: Create bridge again (idempotent)
openvswitch_db:
table: Bridge
record: br-test
col: other_config
key: disable-in-band
value: true
register: result
- assert:
that:
- "result.changed == false"
- name: Change column value
openvswitch_db:
table: Bridge
record: br-test
col: other_config
key: disable-in-band
value: false
register: result
- assert:
that:
- "result.changed == true"
- name: Change column value again (idempotent)
openvswitch_db:
table: Bridge
record: br-test
col: other_config
key: disable-in-band
value: false
register: result
- assert:
that:
- "result.changed == false"
- name: Remove bridge
openvswitch_db:
table: Bridge
record: br-test
col: other_config
key: disable-in-band
value: false
state: absent
register: result
- assert:
that:
- "result.changed == true"
- name: Remove bridge again (idempotent)
openvswitch_db:
table: Bridge
record: br-test
col: other_config
key: disable-in-band
value: false
state: absent
register: result
- assert:
that:
- "result.changed == false"
- name: Tear down test bridge
command: ovs-vsctl del-br br-test