File tree Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ install:
23
23
24
24
script :
25
25
- TRACE=1 ./test.sh
26
+ - ./scripts/install_test.sh
26
27
27
28
# TBD. Suppressing for now.
28
29
notifications :
Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ command_exists tar
48
48
if [ " x${KUBEBUILDER_VERSION} " = " x" ] ; then
49
49
KUBEBUILDER_VERSION=$( curl -L -s https://api.github.com/repos/kubernetes-sigs/kubebuilder/releases/latest | \
50
50
grep tag_name | sed " s/ *\" tag_name\" : *\"\\ (.*\\ )\" ,*/\\ 1/" )
51
+ if [ -z " $KUBEBUILDER_VERSION " ]; then
52
+ echo " \nUnable to fetch the latest version tag. This may be due to network access problem"
53
+ exit 0
54
+ fi
51
55
fi
52
56
53
57
KUBEBUILDER_VERSION=${KUBEBUILDER_VERSION# " v" }
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ source ./scripts/install.sh
4
+
5
+ echo " Start test"
6
+
7
+ if [ -z " $KUBEBUILDER_VERSION " ]; then
8
+ echo " \nUnable to fetch the latest version tag. Quit the test"
9
+ exit 0
10
+ fi
11
+
12
+ echo " 1. Check whether $TMP_DIR folder is removed.\n"
13
+ if [ -d " $TMP_DIR " ]; then
14
+ echo " $TMP_DIR folder is not removed."
15
+ exit 1
16
+ fi
17
+ echo " passed\n"
18
+
19
+ echo " 2. Check whether $KUBEBUILDER_DIR folder exists.\n"
20
+ if [ ! -d " $KUBEBUILDER_DIR " ]; then
21
+ echo " $KUBEBUILDER_DIR folder is not existed."
22
+ exit 1
23
+ fi
24
+ echo " passed\n"
25
+
26
+ echo " 3. Check whether kubebuilder is installed properly.\n"
27
+ if [ ! -x " $KUBEBUILDER_DIR /bin/kubebuilder" ]; then
28
+ echo " $KUBEBUILDER_DIR /bin/kubebuilder is not existed or execute permission not granted."
29
+ exit 1
30
+ fi
31
+ echo " passed\n"
32
+
33
+ echo " 4. Check whether kubebuilder version is same as installed.\n"
34
+ KUBEBUILDER_VERSION_FROM_BIN=$( $KUBEBUILDER_DIR /bin/kubebuilder version | \
35
+ sed ' s/^.*KubeBuilderVersion:"\(.*\)", KubernetesVendor.*$/\1/' )
36
+ if [ ! " ${KUBEBUILDER_VERSION_FROM_BIN} " = " ${KUBEBUILDER_VERSION} " ]; then
37
+ echo " kubebuilder version ${KUBEBUILDER_VERSION_FROM_BIN} mismatched from the version installed (${KUBEBUILDER_VERSION} )"
38
+ exit 1
39
+ fi
40
+ echo " passed\n"
41
+
42
+ echo " install test done successfully\n"
43
+ exit 0
You can’t perform that action at this time.
0 commit comments