Add ODL upgrade test 36/76336/15
authorTaseer <taseer94@gmail.com>
Thu, 20 Sep 2018 21:45:46 +0000 (23:45 +0200)
committerTaseer Ahmed <taseer94@gmail.com>
Fri, 23 Nov 2018 22:39:34 +0000 (22:39 +0000)
Adds a new test, which first installs ODL version 8, and asserts
the expected version. Next ODL 8 is uninstalled and the ODL 9
is installed, via an Ansible ODL run.

Also changes the state of the package to installed from current
to the latest one

JIRA: INTPAK-29

Change-Id: I050ab648a490403b03c291a1c75480069d443301
Signed-off-by: Taseer <taseer94@gmail.com>
tasks/install_odl_via_rpm_repo.yml
tests/test-odl-upgrade.yaml [new file with mode: 0644]

index 6346d74950f9f13ad1978aed617a358a779fa678..3e4125d866a75b360cc6194f1d5c9f495be4a5c3 100644 (file)
@@ -8,4 +8,4 @@
 - name: Install ODL via RPM repo
   package:
     name=opendaylight
-    state=present
+    state=latest
diff --git a/tests/test-odl-upgrade.yaml b/tests/test-odl-upgrade.yaml
new file mode 100644 (file)
index 0000000..9c26919
--- /dev/null
@@ -0,0 +1,35 @@
+---
+
+- hosts: localhost
+  connection: local
+  become: True
+  roles:
+    - role: opendaylight
+      rpm_repo_url: "https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-8-devel.repo"
+
+  post_tasks:
+    - name: get ODL version info
+      command: yum info opendaylight
+      register: initial_odl_version
+
+    - name: assert that ODL 8 is installed
+      assert:
+        that:
+          - "'Version     : 8.4.0' in initial_odl_version.stdout"
+
+- hosts: localhost
+  connection: local
+  become: True
+  roles:
+    - role: opendaylight
+      rpm_repo_url: "https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-9-devel.repo"
+
+  post_tasks:
+    - name: get ODL version info
+      command: yum info opendaylight
+      register: final_odl_version
+
+    - name: assert that ODL 9 is installed
+      assert:
+        that:
+          - "'Version     : 9.2.0' in final_odl_version.stdout"