@@ -41,17 +41,32 @@ suite(
41
41
'echo KUBEDOCK_ENABLED\n' +
42
42
'/entrypoint.sh\n' +
43
43
'cd $PROJECT_SOURCE\n' +
44
+ 'export ARCH=$(uname -m)\n' +
45
+ 'export DATE=$(date +"%m%d%y")\n' +
44
46
'export USER=$(oc whoami)\n' +
45
47
'export TKN=$(oc whoami -t)\n' +
46
48
'export REG="image-registry.openshift-image-registry.svc:5000"\n' +
47
49
'export PROJECT=$(oc project -q)\n' +
48
- 'export IMG="${REG}/${PROJECT}/hello"\n' +
50
+ 'export IMG="${REG}/${PROJECT}/hello:${DATE}"\n' +
51
+ 'podman login --tls-verify=false --username ${USER} --password ${TKN} ${REG}\n' +
52
+ 'podman build -t ${IMG} -f Dockerfile.${ARCH}\n' +
53
+ 'podman push --tls-verify=false ${IMG}\n' ;
54
+
55
+ const runTestScript : string =
56
+ '# Enable Kubedock\n' +
57
+ 'export KUBEDOCK_ENABLED=true\n' +
58
+ 'echo KUBEDOCK_ENABLED\n' +
59
+ '/entrypoint.sh\n' +
60
+ 'export DATE=$(date +"%m%d%y")\n' +
61
+ 'export USER=$(oc whoami)\n' +
62
+ 'export TKN=$(oc whoami -t)\n' +
63
+ 'export REG="image-registry.openshift-image-registry.svc:5000"\n' +
64
+ 'export PROJECT=$(oc project -q)\n' +
65
+ 'export IMG="${REG}/${PROJECT}/hello:${DATE}"\n' +
49
66
'podman login --tls-verify=false --username ${USER} --password ${TKN} ${REG}\n' +
50
- 'podman build -t ${IMG} .\n' +
51
- 'podman push --tls-verify=false ${IMG}\n' +
52
67
'podman run --rm ${IMG}' ;
53
68
54
- const factoryUrl : string = 'https://github.com/l0rd /dockerfile-hello-world' ;
69
+ const factoryUrl : string = 'https://github.com/crw-qe /dockerfile-hello-world' ;
55
70
56
71
suiteSetup ( 'Login' , async function ( ) : Promise < void > {
57
72
await loginTests . loginIntoChe ( ) ;
77
92
78
93
test ( 'Check the project files were imported' , async function ( ) : Promise < void > {
79
94
const projectSection : ViewSection = await projectAndFileTests . getProjectViewSession ( ) ;
80
- expect ( await projectAndFileTests . getProjectTreeItem ( projectSection , 'Dockerfile' ) , 'Files not imported' ) . not . undefined ;
95
+ expect ( await projectAndFileTests . getProjectTreeItem ( projectSection , 'Dockerfile.ppc64le ' ) , 'Files not imported' ) . not . undefined ;
81
96
} ) ;
82
97
83
98
test ( 'Create and check container runs using kubedock and podman' , function ( ) : void {
@@ -86,7 +101,9 @@ suite(
86
101
kubernetesCommandLineToolsExecutor . loginToOcp ( ) ;
87
102
kubernetesCommandLineToolsExecutor . getPodAndContainerNames ( ) ;
88
103
const output : ShellString = kubernetesCommandLineToolsExecutor . execInContainerCommand ( testScript ) ;
89
- expect ( output , 'Podman test script failed' ) . contains ( 'Hello from Kubedock!' ) ;
104
+ expect ( output , 'Podman test script failed' ) . contains ( 'Successfully tagged' ) ;
105
+ const runOutput : ShellString = kubernetesCommandLineToolsExecutor . execInContainerCommand ( runTestScript ) ;
106
+ expect ( runOutput , 'Podman test script failed' ) . contains ( 'Hello from Kubedock!' )
90
107
} ) ;
91
108
92
109
suiteTeardown ( 'Open dashboard and close all other tabs' , async function ( ) : Promise < void > {
0 commit comments