7
7
timestamp=$( date +%s)
8
8
namespace=" e2e-tests-${timestamp} -$RANDOM "
9
9
10
- tmpdir=` mktemp -d 2> /dev/null || mktemp -d -t ' valuetmpdir' `
11
- cp test/e2e/e2e-values.yaml ${tmpdir} /e2e-values.yaml
10
+ tmpdir=$( mktemp -d 2> /dev/null || mktemp -d -t ' valuetmpdir' )
11
+ cp test/e2e/e2e-values.yaml " ${tmpdir} /e2e-values.yaml"
12
12
13
13
echo " namespace: ${namespace} " >> ${tmpdir} /e2e-values.yaml
14
14
echo " watchedNamespaces: ${namespace} " >> ${tmpdir} /e2e-values.yaml
15
15
echo " catalog_namespace: ${namespace} " >> ${tmpdir} /e2e-values.yaml
16
16
17
- ./scripts/package-release.sh 1.0.0-e2e test/e2e/resources ${tmpdir} /e2e-values.yaml
17
+ ./scripts/package-release.sh 1.0.0-e2e test/e2e/resources " ${tmpdir} /e2e-values.yaml"
18
18
19
19
function cleanup {
20
- kubectl delete namespace ${namespace}
20
+ kubectl delete namespace " ${namespace} "
21
21
rm -rf test/e2e/resources
22
22
rm -rf test/e2e/test-resources
23
23
}
@@ -26,24 +26,24 @@ function cleanupAndExit {
26
26
exitCode=$?
27
27
if [ " $exitCode " -ne " 0" ]; then
28
28
echo " error running tests. logs written to olm.log and catalog.log" ;
29
- kubectl -n ${namespace} logs -l app=alm-operator > olm.log;
30
- kubectl -n ${namespace} logs -l app=catalog-operator > catalog.log;
31
- kubectl -n ${namespace} logs -l app=package-server > package.log
29
+ kubectl -n " ${namespace} " logs -l app=alm-operator > olm.log;
30
+ kubectl -n " ${namespace} " logs -l app=catalog-operator > catalog.log;
31
+ kubectl -n " ${namespace} " logs -l app=package-server > package.log
32
32
fi
33
33
cleanup
34
34
exit $exitCode
35
35
}
36
36
37
37
trap cleanupAndExit SIGINT SIGTERM EXIT
38
38
39
- ./scripts/install_local.sh ${namespace} test/e2e/resources
39
+ ./scripts/install_local.sh " ${namespace} " test/e2e/resources
40
40
41
41
mkdir -p test/e2e/test-resources
42
- helm template --set namespace=${namespace} -f test/e2e/e2e-values.yaml test/e2e/chart --output-dir test/e2e/test-resources
42
+ helm template --set namespace=" ${namespace} " -f test/e2e/e2e-values.yaml test/e2e/chart --output-dir test/e2e/test-resources
43
43
44
- eval $( minikube docker-env) || { echo ' Cannot switch to minikube docker' ; exit 1; }
44
+ eval " $( minikube docker-env) " || { echo ' Cannot switch to minikube docker' ; exit 1; }
45
45
kubectl apply -f test/e2e/test-resources/alm-e2e/templates
46
- until kubectl -n ${namespace} logs job/e2e | grep -v " ContainerCreating" ; do echo " waiting for job to run" && sleep 1; done
47
- kubectl -n ${namespace} logs job/e2e -f
46
+ until kubectl -n " ${namespace} " logs job/e2e | grep -v " ContainerCreating" ; do echo " waiting for job to run" && sleep 1; done
47
+ kubectl -n " ${namespace} " logs job/e2e -f
48
48
49
49
0 commit comments