X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=tests%2Fos%2Fvuls%2Fvuls.robot;fp=tests%2Fos%2Fvuls%2Fvuls.robot;h=6ddc2836be593afecfad42ee47b5ae87616894e3;hb=37a1ec033aa1711ac75b2f89b038684d5de80dba;hp=0000000000000000000000000000000000000000;hpb=97008c11c42915afad6ed9ebb53e2c25312360cd;p=validation.git diff --git a/tests/os/vuls/vuls.robot b/tests/os/vuls/vuls.robot new file mode 100644 index 0000000..6ddc283 --- /dev/null +++ b/tests/os/vuls/vuls.robot @@ -0,0 +1,52 @@ +############################################################################## +# 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 SSHLibrary +Library OperatingSystem +Library BuiltIn +Library Process + +*** Variables *** +${LOG_PATH} /opt/akraino/validation/tests/os/vuls + +*** Test Cases *** +Run Vuls test + Set Environment Variable GOROOT /root/go + Set Environment Variable GOPATH /root/go/src + Set Environment Variable PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/go/bin:/root/go/src/bin + Set Environment Variable LC_ALL en_US.UTF-8 + Set Environment Variable LANG en_US.UTF-8 + + ${rc} = Run And Return Rc install -D /opt/akraino/validation/tests/os/vuls/config /root/.ssh/ + Should Be Equal As Integers ${rc} 0 + + ${rc} = Run And Return Rc sed -i 's/HOST/${HOST}/g' config.toml + Should Be Equal As Integers ${rc} 0 + + ${rc} = Run And Return Rc sed -i 's/USERNAME/${USERNAME}/g' config.toml + Should Be Equal As Integers ${rc} 0 + + ${rc} = Run And Return Rc tar xvzf db.tar.gz -C /opt/akraino/validation/tests/os/vuls/ + Should Be Equal As Integers ${rc} 0 + + ${rc} = Run And Return Rc vuls scan -config config.toml -ssh-config + Should Be Equal As Integers ${rc} 0 + + ${rc} ${output} = Run And Return Rc And Output vuls report + Should Be Equal As Integers ${rc} 0 + Append To File ${LOG_PATH}/vuls.log ${output}${\n}