[Ubuntu] Migrate tests for common tools to Pester (part 1) (#2288)

* add common tools tests pt1

* fix tests

* fix erlang test

* resolve comments

* minor changes

* remove extra logging
This commit is contained in:
Dibir Magomedsaygitov
2020-12-23 10:25:52 +03:00
committed by GitHub
parent 7ff71c853d
commit a9a236f7e5
13 changed files with 166 additions and 81 deletions

View File

@@ -4,6 +4,8 @@
## Desc: Installs erlang
################################################################################
source $HELPER_SCRIPTS/invoke-tests.sh
source_list=/etc/apt/sources.list.d/eslerlang.list
# Install Erlang
@@ -17,14 +19,7 @@ wget -q -O rebar3 https://s3.amazonaws.com/rebar3/rebar3
chmod +x rebar3
mv rebar3 /usr/local/bin/rebar3
# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
for cmd in erl erlc rebar3; do
if ! command -v $cmd; then
echo "$cmd was not installed or not found on PATH"
exit 1
fi
done
invoke_tests "Tools" "erlang"
# Clean up source list
rm $source_list