summaryrefslogtreecommitdiffstats
path: root/csit
diff options
context:
space:
mode:
Diffstat (limited to 'csit')
-rw-r--r--csit/data/test-tree.json6
-rwxr-xr-xcsit/prepare-csit.sh25
-rw-r--r--csit/pylibs.txt2
-rwxr-xr-xcsit/run-csit.sh25
-rw-r--r--csit/tests/cps-data/cps-data.robot4
5 files changed, 51 insertions, 11 deletions
diff --git a/csit/data/test-tree.json b/csit/data/test-tree.json
index 89d6784275..8f4b522799 100644
--- a/csit/data/test-tree.json
+++ b/csit/data/test-tree.json
@@ -2,11 +2,11 @@
"test-tree": {
"branch": [
{
- "name": "Left",
+ "name": "LEFT/left",
"nest": {
- "name": "Small",
+ "name": "SMALL/small",
"birds": [
- "Sparrow",
+ "SPARROW/sparrow",
"Robin",
"Finch"
]
diff --git a/csit/prepare-csit.sh b/csit/prepare-csit.sh
index 67412f3cf3..78f0fbde22 100755
--- a/csit/prepare-csit.sh
+++ b/csit/prepare-csit.sh
@@ -28,6 +28,21 @@ fi
TESTPLANDIR=${WORKSPACE}/${TESTPLAN}
+# Version should match those used to setup robot-framework in other jobs/stages
+# Use pyenv for selecting the python version
+if [[ -d "/opt/pyenv" ]]; then
+ echo "Setup pyenv:"
+ export PYENV_ROOT="/opt/pyenv"
+ export PATH="$PYENV_ROOT/bin:$PATH"
+ pyenv versions
+ if command -v pyenv 1>/dev/null 2>&1; then
+ eval "$(pyenv init - --no-rehash)"
+ # Choose the latest numeric Python version from installed list
+ version=$(pyenv versions --bare | sed '/^[^0-9]/d' | sort -V | tail -n 1)
+ pyenv local "${version}"
+ fi
+fi
+
# Assume that if ROBOT3_VENV is set and virtualenv with system site packages can be activated,
# ci-management/jjb/integration/include-raw-integration-install-robotframework.sh has already
# been executed
@@ -42,13 +57,17 @@ else
rm -f ${WORKSPACE}/env.properties
cd /tmp
git clone "https://gerrit.onap.org/r/ci-management"
- source /tmp/ci-management/jjb/integration/include-raw-integration-install-robotframework-py3.sh
+# source /tmp/ci-management/jjb/integration/include-raw-integration-install-robotframework-py3.sh
+ source ${WORKSPACE}/install-robotframework.sh
fi
# install eteutils
mkdir -p ${ROBOT3_VENV}/src/onap
rm -rf ${ROBOT3_VENV}/src/onap/testsuite
-python3 -m pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5.1.*' --pre
-pip freeze
+python3 -m pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==11.0.0.dev17' --pre
+echo "Versioning information:"
+python3 --version
+pip freeze
+python3 -m robot.run --version || : \ No newline at end of file
diff --git a/csit/pylibs.txt b/csit/pylibs.txt
index 4952616540..9fee634156 100644
--- a/csit/pylibs.txt
+++ b/csit/pylibs.txt
@@ -6,7 +6,7 @@ pyhocon
requests
robotframework-httplibrary
robotframework-requests==0.9.3
-robotframework-selenium2library
+robotframework-selenium2library==3.0.0
robotframework-extendedselenium2library
robotframework-sshlibrary
scapy
diff --git a/csit/run-csit.sh b/csit/run-csit.sh
index 6703160a37..9a344c1ffd 100755
--- a/csit/run-csit.sh
+++ b/csit/run-csit.sh
@@ -20,14 +20,29 @@
# Branched from ccsdk/distribution to this repository Feb 23, 2021
+echo "---> run-csit.sh"
+
WORKDIR=$(mktemp -d --suffix=-robot-workdir)
+# Version should match those used to setup robot-framework in other jobs/stages
+# Use pyenv for selecting the python version
+if [[ -d "/opt/pyenv" ]]; then
+ echo "Setup pyenv:"
+ export PYENV_ROOT="/opt/pyenv"
+ export PATH="$PYENV_ROOT/bin:$PATH"
+ pyenv versions
+ if command -v pyenv 1>/dev/null 2>&1; then
+ eval "$(pyenv init - --no-rehash)"
+ # Choose the latest numeric Python version from installed list
+ version=$(pyenv versions --bare | sed '/^[^0-9]/d' | sort -V | tail -n 1)
+ pyenv local "${version}"
+ fi
+fi
+
#
# functions
#
-echo "---> run-csit.sh"
-
# wrapper for sourcing a file
function source_safely() {
[ -z "$1" ] && return 1
@@ -192,6 +207,12 @@ SUITES=$( xargs -a testplan.txt )
echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
echo "Starting Robot test suites ${SUITES} ..."
relax_set
+
+echo "Versioning information:"
+python3 --version
+pip freeze
+python3 -m robot.run --version || :
+
python3 -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
RESULT=$?
load_set
diff --git a/csit/tests/cps-data/cps-data.robot b/csit/tests/cps-data/cps-data.robot
index 2da2b73414..096bd07b79 100644
--- a/csit/tests/cps-data/cps-data.robot
+++ b/csit/tests/cps-data/cps-data.robot
@@ -44,10 +44,10 @@ Create Data Node
Get Data Node by XPath
${uri}= Set Variable ${basePath}/v1/dataspaces/${dataspaceName}/anchors/${anchorName}/node
- ${params}= Create Dictionary xpath=/test-tree/branch[@name='Left']/nest
+ ${params}= Create Dictionary xpath=/test-tree/branch[@name='LEFT/left']/nest
${headers}= Create Dictionary Authorization=${auth}
${response}= Get On Session CPS_URL ${uri} params=${params} headers=${headers} expected_status=200
${responseJson}= Set Variable ${response.json()['tree:nest']}
- Should Be Equal As Strings ${responseJson['name']} Small
+ Should Be Equal As Strings ${responseJson['name']} SMALL/small