blob: 7d0415a4444cc80f98382389a988758a2b7bbf9f [file] [log] [blame]
Victor Moralesdd074802017-07-26 16:06:35 -05001#!/bin/bash
2
Victor Moralese7467002017-08-30 14:50:43 -05003source /var/onap_tests/asserts
Victor Moralesdd074802017-07-26 16:06:35 -05004
5# main() - Starting point for Unit Tests
6function main {
7 local covered_functions=("$@")
8
9 len=${#covered_functions[@]}
10 echo "1..$len"
11 for i in ${!covered_functions[@]}; do
12 dpkg --get-selections > installed-software
13 sort -o installed-software installed-software
14 test_${covered_functions[$i]}
15 echo "ok $((i+1)) - test_${covered_functions[$i]}"
16
17 # Teardown process
Victor Moralescf269992017-10-18 09:29:55 -070018 if ! is_package_installed docker-ce; then
19 docker images -q | xargs docker rmi -f
20 fi
Victor Moralesdd074802017-07-26 16:06:35 -050021 dpkg --get-selections > installed-software_new
22 sort -o installed-software_new installed-software_new
23 apt-get purge -y -qq $(comm -3 installed-software installed-software_new | awk '{print $1}')
24 #rm -rf $git_src_folder
25 #rm -rf ~/.m2/
26 done
27}