Skip to content

Commit 77894cd

Browse files
authored
Update KubedockTest for P/Z (#22962)
Signed-off-by: Sachin Itagi <sachin.itagi@ibm.com>
1 parent 0059eaa commit 77894cd

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

tests/e2e/specs/miscellaneous/KubedockPodmanTest.spec.ts

+23-6
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,32 @@ suite(
4141
'echo KUBEDOCK_ENABLED\n' +
4242
'/entrypoint.sh\n' +
4343
'cd $PROJECT_SOURCE\n' +
44+
'export ARCH=$(uname -m)\n' +
45+
'export DATE=$(date +"%m%d%y")\n' +
4446
'export USER=$(oc whoami)\n' +
4547
'export TKN=$(oc whoami -t)\n' +
4648
'export REG="image-registry.openshift-image-registry.svc:5000"\n' +
4749
'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' +
4966
'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' +
5267
'podman run --rm ${IMG}';
5368

54-
const factoryUrl: string = 'https://github.com/l0rd/dockerfile-hello-world';
69+
const factoryUrl: string = 'https://github.com/crw-qe/dockerfile-hello-world';
5570

5671
suiteSetup('Login', async function (): Promise<void> {
5772
await loginTests.loginIntoChe();
@@ -77,7 +92,7 @@ suite(
7792

7893
test('Check the project files were imported', async function (): Promise<void> {
7994
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;
8196
});
8297

8398
test('Create and check container runs using kubedock and podman', function (): void {
@@ -86,7 +101,9 @@ suite(
86101
kubernetesCommandLineToolsExecutor.loginToOcp();
87102
kubernetesCommandLineToolsExecutor.getPodAndContainerNames();
88103
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!')
90107
});
91108

92109
suiteTeardown('Open dashboard and close all other tabs', async function (): Promise<void> {

0 commit comments

Comments
 (0)