Last active
July 22, 2019 09:05
-
-
Save ibobcode/176fd3645ece55054a3c6f9ce861d533 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
is_mounted_test() { | |
if test -d "/fs"; then | |
printf "> Mounted fs : \t OK\n" | |
else | |
printf "> Mounted fs : \t KO\n" | |
fi | |
} | |
file_creation_test() { | |
if touch "/fs/testfile"; then | |
printf "> Created file : \t OK\n" | |
else | |
printf "> Created file : \t KO\n" | |
fi | |
} | |
compress_directory_test() { | |
if tar -cf ./results.tar -C / fs; then | |
printf "> Created tarball : \t OK\n" | |
else | |
printf "> Created tarball : \t KO\n" | |
fi | |
} | |
echo "---------- START TESTS ---------" | |
printf "\n" | |
sleep 1 | |
printf "> Curled source file : \t OK\n" | |
sleep 1 | |
is_mounted_test | |
sleep 1 | |
file_creation_test | |
sleep 1 | |
compress_directory_test | |
sleep 1 | |
printf "\n" | |
echo "----------- END TESTS ----------" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment