1 ##############################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property. #
3 # Copyright (c) 2019 Nokia. #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you maynot use this file except in compliance with the License. #
8 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ##############################################################################
20 Documentation Run K8s Conformance Test
22 Library OperatingSystem
24 Suite Setup Open Connection And Log In
25 Suite Teardown Close All Connections
29 ${USERNAME} localadmin
30 ${LOG} /opt/akraino/validation/conformance/print_conformance.txt
34 [Documentation] Verify Robot
35 Start Command robot --version
36 ${stdout}= Read Command Output
37 Append To File ${LOG} ${stdout}${\n}
38 Should Contain ${stdout} Robot Framework
41 [Documentation] Verify Go Package
43 ${stdout}= Read Command Output
44 Append To File ${LOG} ${stdout}${\n}
45 Should Contain ${stdout} Hello, world!
48 Start Sonobuoy Conformance Test
49 [Documentation] Test will take about 1hr and 40 mins to complete
50 ${output}= Execute Command cat /opt/akraino/validation/conformance/sonobuoy.yaml | kubectl apply -f - sudo=True
51 Append To File ${LOG} ${output}${\n}
53 Should Contain ${output} pod/sonobuoy created
56 Description of Sonobuoy Pods
57 [Documentation] Description of Sonobuoy Pod
58 ${output} ${rc}= Execute Command kubectl describe pod/sonobuoy -n heptio-sonobuoy return_rc=True sudo=True
59 Append To File ${LOG} ${output}${\n}
60 Should Be Equal As Integers ${rc} 0
63 Verify Conformance Test is Running
64 [Documentation] Conformance Test ongoing
65 ${output} ${rc}= Execute Command kubectl get pods --all-namespaces -o wide | grep heptio return_rc=True sudo=True
66 Append To File ${LOG} ${output}${\n}
67 Should Be Equal As Integers ${rc} 0
72 Open Connection And Log In
73 Open Connection ${HOST}
74 Login With Public Key ${USERNAME} /root/.ssh/${USERNAME}_id_rsa