Skip to content

Commit

Permalink
Use devspaces-dashboard.openshift-devspaces.svc to get devfile yaml (#…
Browse files Browse the repository at this point in the history
…23366)

Signed-off-by: Dmytro Nochevnov <dnochevn@redhat.com>
  • Loading branch information
dmytro-ndp authored Feb 27, 2025
1 parent 740ef2d commit 43d3fdd
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/e2e/utils/DevfilesHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,8 @@ import { CLASSES } from '../configs/inversify.types';
export class DevfilesHelper {
public getInternalClusterURLToDevFile(devFileName: string): string {
const devfileSampleURIPrefix: string = `/dashboard/api/airgap-sample/devfile/download?id=${devFileName}`;
let serviceClusterIp: string = '';
let servicePort: string = '';
serviceClusterIp = this.getShellExecutor().executeArbitraryShellScript(
`oc get svc devspaces-dashboard -n ${BASE_TEST_CONSTANTS.TS_PLATFORM}-${BASE_TEST_CONSTANTS.TESTING_APPLICATION_NAME()} -o=jsonpath='{.spec.clusterIP}'`
);
servicePort = this.getShellExecutor().executeArbitraryShellScript(
`oc get svc devspaces-dashboard -n ${BASE_TEST_CONSTANTS.TS_PLATFORM}-${BASE_TEST_CONSTANTS.TESTING_APPLICATION_NAME()} -o=jsonpath='{.spec.ports[*].port}'`
);
return `http://${serviceClusterIp}:${servicePort}${devfileSampleURIPrefix}`;

return `http://devspaces-dashboard.openshift-devspaces.svc:8080${devfileSampleURIPrefix}`;
}

/**
Expand Down

0 comments on commit 43d3fdd

Please sign in to comment.