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
Signed-off-by: Dmytro Nochevnov <[email protected]>
  • Loading branch information
dmytro-ndp committed Feb 26, 2025
1 parent 880b008 commit 45ad9a5
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions tests/e2e/utils/DevfilesHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,7 @@ export class DevfilesHelper {
public getInternalClusterURLToDevFile(devFileName: string): string {
const devfileSampleURIPrefix: string = `/dashboard/api/airgap-sample/devfile/download?id=${devFileName}`;

// internal clusterIP is restricted by proxy when get devfile from the disconnected cluster
if (BASE_TEST_CONSTANTS.IS_CLUSTER_DISCONNECTED()) {
return `${BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL}${devfileSampleURIPrefix}`;
}

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 45ad9a5

Please sign in to comment.