From ce3094f1ef4f3197d730cc38a152811919347c17 Mon Sep 17 00:00:00 2001 From: dave kormann Date: Tue, 15 Oct 2019 11:37:09 -0400 Subject: [PATCH] FIX: move some end-to-end test configs to values.yaml for nanobot A few of the configurations for the ete testsuite were baked into the testsuite file. This change moves those configs to the global properties file and allows them to be configured out of the nanobot values.yaml. This change only affects the nanobot version of those files. The change also makes a minor update to elminate the requirement for a host path for logging; that is now optional. signed-off-by: dave kormann Change-Id: I02be793f3a5a6f7f51a7ec081ad372aead1f66f9 --- .../public/properties/global_properties.robot | 6 ++++++ .../configmap-src/public/testsuites/ete.robot | 9 ++++----- .../helm/nanobot/templates/job-ric-robot-run.yaml | 17 +++++++++++++++++ ric_robot_suite/helm/nanobot/values.yaml | 22 +++++++++++++++++++--- 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/ric_robot_suite/helm/nanobot/configmap-src/public/properties/global_properties.robot b/ric_robot_suite/helm/nanobot/configmap-src/public/properties/global_properties.robot index d1a7597..58f22dd 100644 --- a/ric_robot_suite/helm/nanobot/configmap-src/public/properties/global_properties.robot +++ b/ric_robot_suite/helm/nanobot/configmap-src/public/properties/global_properties.robot @@ -42,3 +42,9 @@ ${GLOBAL_INJECTED_RTMGR_PASSWORD} {{ .Values.ric.platform.components.rtmgr.p # ${GLOBAL_INJECTED_DBAAS_IP_ADDR} {{ printf "%s.%s" (include "common.servicename.dbaas.tcp" .) $ricplt }} ${GLOBAL_DBAAS_SERVER_PORT} {{ include "common.serviceport.dbaas.tcp" . }} +# +${GLOBAL_TEST_XAPP} {{ default "xapp-std" .Values.ric.robot.environment.xapp }} +# +${GLOBAL_TEST_NODEB_NAME} {{ default "AAAA456789" .Values.ric.robot.environment.gNodeB.name }} +${GLOBAL_TEST_NODEB_ADDRESS} {{ default "10.0.0.3" .Values.ric.robot.environment.gNodeB.address }} +${GLOBAL_TEST_NODEB_PORT} {{ default "36421" .Values.ric.robot.environment.gNodeB.port }} \ No newline at end of file diff --git a/ric_robot_suite/helm/nanobot/configmap-src/public/testsuites/ete.robot b/ric_robot_suite/helm/nanobot/configmap-src/public/testsuites/ete.robot index 3dbc92e..8f8b282 100644 --- a/ric_robot_suite/helm/nanobot/configmap-src/public/testsuites/ete.robot +++ b/ric_robot_suite/helm/nanobot/configmap-src/public/testsuites/ete.robot @@ -10,11 +10,10 @@ Resource ../resources/e2mgr/e2mgr_interface.robot Resource ../resources/dashboard/dashboard_interface.robot *** Variables *** -${TEST_XAPPNAME} xapp-std -${TEST_XAPPID} 101 -${TEST_NODE_B_NAME} AAAA456789 -${TEST_NODE_B_IP} 10.0.0.3 -${TEST_NODE_B_PORT} 36421 +${TEST_XAPPNAME} ${GLOBAL_TEST_XAPP} +${TEST_NODE_B_NAME} ${GLOBAL_TEST_NODEB_NAME} +${TEST_NODE_B_IP} ${GLOBAL_TEST_NODEB_ADDRESS} +${TEST_NODE_B_PORT} ${GLOBAL_TEST_NODEB_PORT} *** Test Cases *** diff --git a/ric_robot_suite/helm/nanobot/templates/job-ric-robot-run.yaml b/ric_robot_suite/helm/nanobot/templates/job-ric-robot-run.yaml index 14be82d..2ca4ffb 100644 --- a/ric_robot_suite/helm/nanobot/templates/job-ric-robot-run.yaml +++ b/ric_robot_suite/helm/nanobot/templates/job-ric-robot-run.yaml @@ -127,9 +127,11 @@ spec: - name: robot-etc mountPath: /robot/etc readOnly: false + {{- if .Values.ric.robot.log }} - name: robot-log mountPath: /robot/log readOnly: false + {{- end }} - name: robot-bin mountPath: /robot/bin readOnly: true @@ -166,8 +168,19 @@ spec: {{- if not .Values.ric.robot.job.failOnTestFail }} - "--NoStatusRC" {{- end }} + {{- if .Values.ric.robot.log }} - "-d" - "/robot/log" + {{- else }} + - "-o" + - "NONE" + - "-l" + - "NONE" + - "-r" + - "NONE" + - "-L" + - "NONE" + {{- end }} - "--console" - "verbose" - "-C" @@ -198,9 +211,11 @@ spec: - name: robot-etc mountPath: /robot/etc readOnly: true + {{- if .Values.ric.robot.log }} - name: robot-log mountPath: /robot/log readOnly: false + {{- end }} # for compatability with the ric robot, we mount # both properties files and interface libraries # under resources/. @@ -220,9 +235,11 @@ spec: - name: robot-etc emptyDir: {} - name: robot-log + {{- if .Values.ric.robot.log }} hostPath: path: {{ default "/opt/ric/robot/log" .Values.ric.robot.log }} type: DirectoryOrCreate + {{- end }} - name: robot-bin configMap: name: robot-bin diff --git a/ric_robot_suite/helm/nanobot/values.yaml b/ric_robot_suite/helm/nanobot/values.yaml index fd751c1..0abfda0 100644 --- a/ric_robot_suite/helm/nanobot/values.yaml +++ b/ric_robot_suite/helm/nanobot/values.yaml @@ -71,9 +71,9 @@ ric: robot: release: r1 # - # host filesystem path where robot - # output will be stored - log: /opt/ric/robot/log + # If specified, a host filesystem + # path where robot output will be stored + # log: /opt/ric/robot/log # # Active testsuites can be chosen by # tag, testuite names, or both. leaving @@ -107,3 +107,19 @@ ric: create: true # ... and specify the serviceaccount here: # name: nanobot + # + environment: + # the name of a test xapp; the appmgr testsuite + # will attempt to deploy and undeploy this app; + # This should be an xapp which is "onboarded" to + # the appmgr but not deployed at the time the test + # is initiated. + xapp: xapp-std + gNodeB: + # the details of a test gNodeB, for [E/X]2 tests. + # This can be either a real gnodeb or a simulator, + # but in either case should exist prior to test + # initiation. + name: AAAA456789 + address: 10.0.0.3 + port: 36421 -- 2.16.6