Merge pull request #21 from moio/fix_test_script
Tests: run only on directories there are examples for
This commit is contained in:
@@ -18,28 +18,24 @@ if ! [ $(command -v fleet) ]; then
|
|||||||
printf "Path to fleet binary: $FLEET_PATH\n"
|
printf "Path to fleet binary: $FLEET_PATH\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in ../single-cluster/*; do
|
for fixture in ./expected/single-cluster/*; do
|
||||||
if [ ! -d $i ]; then
|
case=${fixture#./expected/}
|
||||||
continue
|
pushd ../$case
|
||||||
fi
|
for env in dev test prod; do
|
||||||
pushd $i
|
mkdir -p ../../tests/output/${case}
|
||||||
for j in dev test prod; do
|
eval $FLEET_PATH test > ../../tests/output/${case}/${env}-output.yaml
|
||||||
mkdir -p ../../tests/output/garbage/${i}
|
eval $FLEET_PATH apply -o - test > ../../tests/output/${case}/bundle.yaml
|
||||||
eval $FLEET_PATH test > ../../tests/output/garbage/${i}/${j}-output.yaml
|
|
||||||
eval $FLEET_PATH apply -o - test > ../../tests/output/garbage/${i}/bundle.yaml
|
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in ../multi-cluster/*; do
|
for fixture in ./expected/multi-cluster/*; do
|
||||||
if [ ! -d $i ]; then
|
case=${fixture#./expected/}
|
||||||
continue
|
pushd ../$case
|
||||||
fi
|
for env in dev test prod; do
|
||||||
pushd $i
|
mkdir -p ../../tests/output/${case}
|
||||||
for j in dev test prod; do
|
eval $FLEET_PATH test -l env=${env} > ../../tests/output/${case}/${env}-output.yaml
|
||||||
mkdir -p ../../tests/output/garbage/${i}
|
eval $FLEET_PATH apply -n fleet-default -o - test > ../../tests/output/${case}/bundle.yaml
|
||||||
eval $FLEET_PATH test -l env=${j} > ../../tests/output/garbage/${i}/${j}-output.yaml
|
|
||||||
eval $FLEET_PATH apply -n fleet-default -o - test > ../../tests/output/garbage/${i}/bundle.yaml
|
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user