51 lines
983 B
Bash
Executable File
51 lines
983 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
DIR=$(mktemp -d)
|
|
TESTS=$DIR/make-deploy/testing
|
|
|
|
function prepdir() {
|
|
mkdir $DIR/make-deploy
|
|
cp -r * $DIR/make-deploy
|
|
cd $DIR
|
|
ln -s make-deploy/Makefile
|
|
touch secrets.mk
|
|
echo "::::::::: testing directory root: $DIR"
|
|
}
|
|
|
|
function cleandir(){
|
|
rm -fr $DIR
|
|
echo "::::::::: cleanup done"
|
|
}
|
|
|
|
function test_with_minimal_vars_apt(){
|
|
echo "::::::::: $FUNCNAME ::::::::::::"
|
|
cp $TESTS/apt_config.mk config.mk
|
|
make deploy
|
|
}
|
|
|
|
function test_with_minimal_vars_compose(){
|
|
echo "::::::::: $FUNCNAME ::::::::::::"
|
|
cp $TESTS/compose_config.mk config.mk
|
|
cp $TESTS/docker-compose.yml .
|
|
make deploy
|
|
rm -f docker-compose.yml
|
|
}
|
|
|
|
function test_with_minimal_vars_compose_file(){
|
|
echo "::::::::: $FUNCNAME ::::::::::::"
|
|
cp $TESTS/compose_file_config.mk config.mk
|
|
cp $TESTS/docker-compose.yml .
|
|
make deploy
|
|
rm -f docker-compose.yml
|
|
}
|
|
|
|
prepdir
|
|
|
|
test_with_minimal_vars_apt
|
|
test_with_minimal_vars_compose
|
|
test_with_minimal_vars_compose_file
|
|
|
|
cleandir
|