Suite for testing Distribution version reporting 37/39837/3
authorVratko Polak <vrpolak@cisco.com>
Fri, 3 Jun 2016 13:25:57 +0000 (15:25 +0200)
committerVratko Polak <vrpolak@cisco.com>
Fri, 3 Jun 2016 13:26:49 +0000 (15:26 +0200)
Change-Id: I5c9f963c1c0fd6327f9ed47c4e91f5ac8d20460b
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
csit/suites/distribution/version.robot [new file with mode: 0644]
csit/testplans/distribution-userfeatures.txt [new file with mode: 0644]
csit/variables/distribution/version/data.json [new file with mode: 0644]
csit/variables/distribution/version/location.uri [new file with mode: 0644]

diff --git a/csit/suites/distribution/version.robot b/csit/suites/distribution/version.robot
new file mode 100644 (file)
index 0000000..8e74a02
--- /dev/null
@@ -0,0 +1,41 @@
+*** Settings ***
+Documentation     Suite for testing ODL distribution ability to report ist version via Restconf.
+...
+...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...
+...               This program and the accompanying materials are made available under the
+...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
+...               and is available at http://www.eclipse.org/legal/epl-v10.html
+...
+...
+...               Features needed to be installed:
+...               odl-distribution-version (the main feature, defines the version string holder as a config module)
+...               odl-netconf-connector (controller-config device is used to access the config subsystem)
+...               odl-restconf (or odl-restconf-noauth, to get restconf access to the data mounted by controller-config)
+...
+...               Variables needed to be rovided on pybot invocation:
+...               ${BUNDLEFOLDER} (directory name of ODL installation, as it is suffxed by the distribution version)
+...
+...               This suite require both Restconf and Netconf-connector to be ready,
+...               so it is recommended to run netconfready.robot before running this suite.
+Suite Setup       Suite_Setup
+Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Default Tags      critical
+Resource          ${CURDIR}/../../libraries/TemplatedRequests.robot
+Resource          ${CURDIR}/../../libraries/SetupUtils.robot
+
+*** Variables ***
+${VERSION_VARDIR}    ${CURDIR}/../../variables/distribution/version
+
+*** Test Cases ***
+Distribution_Version
+    [Documentation]    Get version string as a part of ${BUNDLEFOLDER} and match with what RESTCONF says.
+    # ${BUNDLEFOLDER} typically looks like this: distribution-karaf-0.5.0-SNAPSHOT
+    ${version} =    BuiltIn.Evaluate    '''${BUNDLEFOLDER}'''[len("distribution-karaf-"):]
+    TemplatedRequests.Get_As_Json_Templated    folder=${VERSION_VARDIR}    mapping={"VERSION":"${version}"}    verify=True
+
+*** Keywords ***
+Suite_Setup
+    SetupUtils.Setup_Utils_For_Setup_And_Teardown
+    TemplatedRequests.Create_Default_Session
diff --git a/csit/testplans/distribution-userfeatures.txt b/csit/testplans/distribution-userfeatures.txt
new file mode 100644 (file)
index 0000000..56349db
--- /dev/null
@@ -0,0 +1,9 @@
+# Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+
+# Place the suites in run order:
+integration/test/csit/suites/netconf/ready/netconfready.robot
+integration/test/csit/suites/distribution/version.robot
diff --git a/csit/variables/distribution/version/data.json b/csit/variables/distribution/version/data.json
new file mode 100644 (file)
index 0000000..7b82036
--- /dev/null
@@ -0,0 +1,9 @@
+{
+ "module": [
+  {
+   "type": "odl-distribution-version:odl-version",
+   "name": "odl-distribution-version",
+   "odl-distribution-version:version": "$VERSION"
+  }
+ ]
+}
diff --git a/csit/variables/distribution/version/location.uri b/csit/variables/distribution/version/location.uri
new file mode 100644 (file)
index 0000000..b5738e7
--- /dev/null
@@ -0,0 +1 @@
+/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-distribution-version:odl-version/odl-distribution-version