Mac test utility (#986)

A utility for running individual or all tests on a Mac dev machine without changing the test script.
This commit is contained in:
Vishal
2019-01-20 16:51:45 +05:30
committed by GitHub
parent e4746007da
commit 3c4fdb0659
15 changed files with 148 additions and 14 deletions
@@ -19,6 +19,7 @@ cleanup() {
kubectl delete configmap ${new_cfgmap} -n default || true
fission spec destroy || true
rm -rf specs || true
rm cfgmap.py || true
}
if [ -z "${TEST_NOCLEANUP:-}" ]; then
+1 -1
View File
@@ -14,7 +14,7 @@ cleanup() {
log "Cleaning up..."
fission env delete --name $env_old || true
fission fn delete --name $fn || true
fission env delete --name $env_old || true
fission env delete --name $env_new || true
}
cleanup
@@ -19,16 +19,16 @@ cleanup() {
kubectl delete secret ${new_secret} -n default || true
fission spec destroy || true
rm -rf specs || true
rm secret.py || true
}
cleanup
if [ -z "${TEST_NOCLEANUP:-}" ]; then
trap cleanup EXIT
else
log "TEST_NOCLEANUP is set; not cleaning up test artifacts afterwards."
fi
cp ../test_secret_cfgmap/secret.py.template secret.py
cp $ROOT/test/tests/test_secret_cfgmap/secret.py.template secret.py
sed -i "s/{{ FN_SECRET }}/${old_secret}/g" secret.py
log "Creating env $env"