@@ -11,34 +11,38 @@ THISDIR=$(dirname ${BASH_SOURCE[0]})
11
11
source " ${THISDIR} /test-lib.sh"
12
12
source " ${THISDIR} /test-lib-openshift.sh"
13
13
source " ${THISDIR} /test-lib-perl.sh"
14
+ source " ${THISDIR} /test-lib-remote-openshift.sh"
14
15
15
16
set -eo nounset
16
17
17
18
trap ct_os_cleanup EXIT SIGINT
18
19
20
+ ct_os_set_ocp4
21
+
19
22
ct_os_check_compulsory_vars
20
23
21
24
oc status || false " It looks like oc is not properly logged in."
22
25
23
- export CT_SKIP_NEW_PROJECT=true
24
- export CT_SKIP_UPLOAD_IMAGE=true
25
- export CT_NAMESPACE=openshift
26
+ # For testing on OpenShift 4 we use internal registry
27
+ export CT_EXTERNAL_REGISTRY=true
26
28
27
29
test -n " ${IMAGE_NAME-} " || false ' make sure $IMAGE_NAME is defined'
28
30
test -n " ${VERSION-} " || false ' make sure $VERSION is defined'
29
31
30
32
# TODO: We should ideally use a local directory instead of ${VERSION}/test/sample-test-app,
31
33
# so we can test changes in that example app that are done as part of the PR
32
- ct_os_test_s2i_app ${IMAGE_NAME} " https://github.com/sclorg/s2i-perl-container.git" " ${THISDIR} /sample-test-app" " Everything is OK"
33
-
34
+ echo " Testing sample-test-app from s2i-perl-container git repository"
35
+ ct_os_test_s2i_app ${IMAGE_NAME} " https://github.com/sclorg/s2i-perl-container.git" " ${VERSION} /test/sample-test-app" " Everything is OK"
36
+ echo " Testing Dancer application"
34
37
ct_os_test_s2i_app ${IMAGE_NAME} " https://github.com/sclorg/dancer-ex.git" . ' Welcome to your Dancer application on OpenShift'
35
-
36
38
# TODO: this was not working because the referenced example dir was added as part of this commit
39
+ echo " Testing template application"
37
40
ct_os_test_template_app " ${IMAGE_NAME} " \
38
- " ${THISDIR} /sample-test-app.json" \
41
+ " https://raw.githubusercontent.com/sclorg/s2i-perl-container/master/examples/templates /sample-test-app.json" \
39
42
perl \
40
43
" Everything is OK" \
41
- 8080 http 200 " -p SOURCE_REPOSITORY_REF=staging -p VERSION=${VERSION} -p NAME=perl-testing"
44
+ 8080 http 200 \
45
+ " -p SOURCE_REPOSITORY_REF=staging -p VERSION=${VERSION} -p NAME=perl-testing"
42
46
43
47
# Check the imagestream
44
48
test_perl_imagestream
0 commit comments