Add actions to Simple K8s test
This commit changes the package used for the test
k8s-03. The new package has actions included and
uses local k8s charms.
This required the additon of the upload-package
commands in the robot test libraries and the
K8s Ns Action command.
Additionally the timeout time for the k8scluster
creation has been extended, as it was to short for
some test environments.
Change-Id: I846733982a7874b3467270d1a1d1fa8a330030f8
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
diff --git a/robot-systest/testsuite/k8s_03-simple_k8s.robot b/robot-systest/testsuite/k8s_03-simple_k8s.robot
index f0aa94d..081219d 100644
--- a/robot-systest/testsuite/k8s_03-simple_k8s.robot
+++ b/robot-systest/testsuite/k8s_03-simple_k8s.robot
@@ -21,6 +21,7 @@
Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
+Resource %{ROBOT_DEVOPS_FOLDER}/lib/package_lib.robot
Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot
Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
Resource %{ROBOT_DEVOPS_FOLDER}/lib/k8scluster_lib.robot
@@ -34,15 +35,20 @@
${ns_id} ${EMPTY}
${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
${publickey} ${EMPTY}
+${vnf_member_index} native_k8s_charm-vnf
+${action_name} changecontent
+${kdu_name} native-kdu
+${application_name} nginx
+${customtitle} Day 2 Action
*** Test Cases ***
Create Simple K8s VNF Descriptor
[Tags] simple_k8s charm sanity regression
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
+ Upload Package '%{PACKAGES_FOLDER}/${vnfd_pkg}'
Create Simple K8s Descriptor
[Tags] simple_k8s charm sanity regression
- Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
+ Upload Package '%{PACKAGES_FOLDER}/${nsd_pkg}'
Add K8s Cluster To OSM
[Tags] simple_k8s charm sanity regression
@@ -53,6 +59,14 @@
${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
Set Suite Variable ${ns_id} ${id}
+Execute Day 2 Operations
+ [Documentation] Performs one Day 2 operation per VNF that creates a new file.
+ [Tags] simple_k8s charm sanity regression
+
+ Variable Should Exist ${ns_id} msg=Network service instance is not available
+ ${ns_op_id}= Execute NS K8s Action ${ns_name} ${action_name} ${vnf_member_index} ${kdu_name} application-name=${application_name} customtitle=${customtitle}
+
+
Delete NS K8s Instance Test
[Tags] simple_k8s charm sanity regression cleanup
Delete NS ${ns_name}
@@ -69,6 +83,11 @@
[Tags] simple_k8s charm sanity regression cleanup
Delete VNFD ${vnfd_name}
+Delete VNF NS Packages
+ [Tags] simple_k8s charm sanity regression cleanup
+ Delete Package '%{PACKAGES_FOLDER}/${vnfd_pkg}'
+ Delete Package '%{PACKAGES_FOLDER}/${nsd_pkg}'
+
*** Keywords ***
Test Cleanup