summaryrefslogtreecommitdiff
path: root/test/integration/targets/openvswitch_db
diff options
context:
space:
mode:
authorRicardo Carrillo Cruz <ricardo.carrillo.cruz@gmail.com>2017-06-12 13:13:41 +0200
committerGitHub <noreply@github.com>2017-06-12 13:13:41 +0200
commitc296fcb0e0fdbbdcfb6a2bed8cf54804d9913eb9 (patch)
tree355ca58e9e865307f4f0f715ab7e7beda206dd30 /test/integration/targets/openvswitch_db
parent3f9d1ab0241d57550ee540f6c0db14149be6b149 (diff)
downloadansible-c296fcb0e0fdbbdcfb6a2bed8cf54804d9913eb9.tar.gz
[WIP] Add openvswitch_db integration tests (#23803)
* WIP Add openvswitch_db integration tests * Add ovs.yaml playbook entrypoint for OVS * Add test case pattern filtering * Clear out aliases for now Running tests on posix group just fails, containers do not have ovs
Diffstat (limited to 'test/integration/targets/openvswitch_db')
-rw-r--r--test/integration/targets/openvswitch_db/aliases0
-rw-r--r--test/integration/targets/openvswitch_db/defaults/main.yaml3
-rw-r--r--test/integration/targets/openvswitch_db/meta/main.yaml2
-rw-r--r--test/integration/targets/openvswitch_db/tasks/main.yml16
-rw-r--r--test/integration/targets/openvswitch_db/tests/basic.yaml25
5 files changed, 46 insertions, 0 deletions
diff --git a/test/integration/targets/openvswitch_db/aliases b/test/integration/targets/openvswitch_db/aliases
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/integration/targets/openvswitch_db/aliases
diff --git a/test/integration/targets/openvswitch_db/defaults/main.yaml b/test/integration/targets/openvswitch_db/defaults/main.yaml
new file mode 100644
index 0000000000..9ef5ba5165
--- /dev/null
+++ b/test/integration/targets/openvswitch_db/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: "*"
+test_items: []
diff --git a/test/integration/targets/openvswitch_db/meta/main.yaml b/test/integration/targets/openvswitch_db/meta/main.yaml
new file mode 100644
index 0000000000..20d55f506f
--- /dev/null
+++ b/test/integration/targets/openvswitch_db/meta/main.yaml
@@ -0,0 +1,2 @@
+dependencies:
+ - prepare_ovs_tests
diff --git a/test/integration/targets/openvswitch_db/tasks/main.yml b/test/integration/targets/openvswitch_db/tasks/main.yml
new file mode 100644
index 0000000000..306d99c801
--- /dev/null
+++ b/test/integration/targets/openvswitch_db/tasks/main.yml
@@ -0,0 +1,16 @@
+---
+
+- name: collect all test cases
+ find:
+ paths: "{{ role_path }}/tests"
+ patterns: "{{ testcase }}.yaml"
+ register: test_cases
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case
+ include: "{{ test_case_to_run }}"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/test/integration/targets/openvswitch_db/tests/basic.yaml b/test/integration/targets/openvswitch_db/tests/basic.yaml
new file mode 100644
index 0000000000..1f2a334550
--- /dev/null
+++ b/test/integration/targets/openvswitch_db/tests/basic.yaml
@@ -0,0 +1,25 @@
+---
+
+- command: ovs-vsctl add-br br-test
+
+- openvswitch_db:
+ table: Bridge
+ record: br-test
+ col: other_config
+ key: disable-in-band
+ value: true
+
+- openvswitch_db:
+ table: Bridge
+ record: br-test
+ col: other_config
+ key: disable-in-band
+ value: false
+
+- openvswitch_db:
+ table: Bridge
+ record: br-test
+ col: other_config
+ key: disable-in-band
+ value: false
+ state: absent