X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=tests%2Fsecurity%2Fdocker%2Fdocker_bench.resource;fp=tests%2Fsecurity%2Fdocker%2Fdocker_bench.resource;h=0000000000000000000000000000000000000000;hb=04ef9a01ce5518e41e4f4c3c43ef37fdb9a18dca;hp=f4b93362b00b3649e20e56782d3c70bfcf20c622;hpb=53172083dd490444fe22678b299f0491cfa22c5c;p=validation.git diff --git a/tests/security/docker/docker_bench.resource b/tests/security/docker/docker_bench.resource deleted file mode 100644 index f4b9336..0000000 --- a/tests/security/docker/docker_bench.resource +++ /dev/null @@ -1,75 +0,0 @@ -############################################################################## -# Copyright (c) 2019 AT&T Intellectual Property. # -# Copyright (c) 2019 Nokia. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you maynot use this file except in compliance with the License. # -# # -# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -############################################################################## - - -*** Settings *** -Library BuiltIn -Library OperatingSystem -Library Process -Library SSHLibrary -Library String - - -*** Variables *** -${REPORTDIR} ${LOG_PATH}${/}${SUITE_NAME.replace(' ','_')} -${SRCDIR} ./docker-bench-security -${DESTDIR} /tmp/docker-bench-security -${NODEDIR} /tmp/docker-bench-security-run -${SSH_OPTS} -o StrictHostKeyChecking=no - - -*** Keywords *** -Open Connection And Log In - Open Connection ${HOST} - Login With Public Key ${USERNAME} ${SSH_KEYFILE} - -Download Docker Bench Software - Remove Docker Bench Software - Run Process git clone - ... https://github.com/docker/docker-bench-security.git ${SRCDIR} - -Upload Test Software To Nodes - Put Directory ${SRCDIR} ${DESTDIR} recursive=True - Get Node Addresses - Copy Test Software To All Nodes - -Run Test Software On Nodes - :FOR ${node} IN @{nodes} - \ Execute Command ssh ${SSH_OPTS} ${node} "cd ${NODEDIR}; sudo ./docker-bench-security.sh -b -l bench.log" - \ Execute Command scp ${SSH_OPTS} ${node}:${NODEDIR}/bench.log ${DESTDIR}/docker-bench-${node}.log - \ Execute Command scp ${SSH_OPTS} ${node}:${NODEDIR}/bench.log.json ${DESTDIR}/docker-bench-${node}.json - \ SSHLibrary.Get File ${DESTDIR}/docker-bench-${node}.log ${REPORTDIR}/ - \ SSHLibrary.Get File ${DESTDIR}/docker-bench-${node}.json ${REPORTDIR}/ - -Get Node Addresses - ${stdout}= Execute Command - ... kubectl get nodes -o jsonpath='{.items[*].status.addresses[?(@.type=="InternalIP")].address'} - @{nodes}= Split String ${stdout} - Set Test Variable @{nodes} - -Copy Test Software To All Nodes - :FOR ${node} IN @{nodes} - \ Execute Command ssh ${SSH_OPTS} ${node} "mkdir -p ${NODEDIR}" - \ Execute Command scp ${SSH_OPTS} -rp ${DESTDIR}/. ${node}:${NODEDIR} - -Remove Docker Bench Software - Remove Directory ${SRCDIR} recursive=True - -Remove Test Software From Nodes - :FOR ${node} IN @{nodes} - \ Execute Command ssh ${SSH_OPTS} ${node} "rm -rf ${NODEDIR}" - Execute Command rm -rf ${DESTDIR}