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 ##############################################################################
25 ${REPORTDIR} ${LOG_PATH}${/}${SUITE_NAME.replace(' ','_')}
26 ${CHARTDIR} /tmp/helm-chart
27 ${SERVECMD} helm serve --repo-path /home/${USERNAME}/.helm/repository/local
31 Open Connection And Log In
32 Open Connection ${HOST}
33 Login With Public Key ${USERNAME} ${SSH_KEYFILE}
35 Start Local Chart Repository Server
36 Stop Local Chart Repository Server
37 Start Command ${SERVECMD}
38 ${rc}= Execute Command pgrep -xf "${SERVECMD}"
39 ... return_stdout=False
41 Should Be Equal As Integers ${rc} 0
43 Stop Local Chart Repository Server
44 Execute Command pkill -xf "${SERVECMD}"
46 List Charts In Repositories
47 ${stdout}= Execute Command helm search --regexp . | tail -n +2 | cut -f1
48 @{CHARTS}= Split String ${stdout}
49 Set Suite Variable @{CHARTS}
52 Execute Command rm -r ${CHARTDIR}
53 Execute Command mkdir -p ${CHARTDIR}
54 :FOR ${chart} IN @{CHARTS}
55 \ ${rc}= Execute Command helm fetch ${chart} -d ${CHARTDIR}
56 ... return_stdout=False
58 \ Should Be Equal As Integers ${rc} 0
61 @{files}= List Files In Directory ${CHARTDIR}
62 :FOR ${file} IN @{files}
63 \ ${stdout}= Execute Command helm lint ${CHARTDIR}/${file}
64 \ Should Contain ${stdout} 1 chart(s) linted, no failures
67 :FOR ${chart} IN @{CHARTS}
68 \ ${rc}= Execute Command helm install --dry-run ${chart}
69 ... return_stdout=False
71 \ Should Be Equal As Integers ${rc} 0