2024-03-04 12:38:28 +00:00
|
|
|
import { getRootPath } from "../src/utils/getRootPath";
|
|
|
|
|
2024-03-07 11:39:26 +00:00
|
|
|
function getTestServerUrl(): string {
|
2024-03-04 12:38:28 +00:00
|
|
|
return process.env.KEYCLOAK_SERVER ?? "http://localhost:8080";
|
|
|
|
}
|
|
|
|
|
2024-03-07 11:39:26 +00:00
|
|
|
export function getKeycloakServerUrl(): string {
|
|
|
|
// In CI, the Keycloak server is running in the same server as tested console, while in dev, it is running on a different port
|
|
|
|
return process.env.CI ? getTestServerUrl() : "http://localhost:8180";
|
|
|
|
}
|
|
|
|
|
2024-03-04 12:38:28 +00:00
|
|
|
export function getAccountUrl() {
|
2024-03-07 11:39:26 +00:00
|
|
|
return getTestServerUrl() + getRootPath();
|
2024-03-04 12:38:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export function getAdminUrl() {
|
2024-03-07 11:39:26 +00:00
|
|
|
return getKeycloakServerUrl() + "/admin/master/console/";
|
2024-03-04 12:38:28 +00:00
|
|
|
}
|