Skip to content

Commit

Permalink
chore: perf test url config refactor suggestion (#1375)
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad authored Nov 1, 2024
1 parent fb08882 commit cb037e4
Showing 1 changed file with 31 additions and 20 deletions.
51 changes: 31 additions & 20 deletions tests/k6/common/config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
const localBaseUrl = "https://localhost:7214/";
const localDockerBaseUrl = "https://host.docker.internal:7214/";
const testBaseUrl = "https://altinn-dev-api.azure-api.net/dialogporten/";
const yt01BaseUrl = "https://platform.yt01.altinn.cloud/dialogporten/";
const stagingBaseUrl = "https://platform.tt02.altinn.no/dialogporten/";
const prodBaseUrl = "https://platform.altinn.no/dialogporten/";

const endUserPath = "api/v1/enduser/";
const serviceOwnerPath = "api/v1/serviceowner/";
const graphqlPath = "graphql";

export const baseUrls = {
v1: {
enduser: {
localdev: "https://localhost:7214/api/v1/enduser/",
localdev_docker: "https://host.docker.internal:7214/api/v1/enduser/",
test: "https://altinn-dev-api.azure-api.net/dialogporten/api/v1/enduser/",
yt01: "https://platform.yt01.altinn.cloud/dialogporten/api/v1/enduser/",
staging: "https://platform.tt02.altinn.no/dialogporten/api/v1/enduser/",
prod: "https://platform.altinn.no/dialogporten/api/v1/enduser/"
localdev: localBaseUrl + endUserPath,
localdev_docker: localDockerBaseUrl + endUserPath,
test: testBaseUrl + endUserPath,
yt01: yt01BaseUrl + endUserPath,
staging: stagingBaseUrl + endUserPath,
prod: prodBaseUrl + endUserPath
},
serviceowner: {
localdev: "https://localhost:7214/api/v1/serviceowner/",
localdev_docker: "https://host.docker.internal:7214/api/v1/serviceowner/",
test: "https://altinn-dev-api.azure-api.net/dialogporten/api/v1/serviceowner/",
yt01: "https://platform.yt01.altinn.cloud/dialogporten/api/v1/serviceowner/",
staging: "https://platform.tt02.altinn.no/dialogporten/api/v1/serviceowner/",
prod: "https://platform.altinn.no/dialogporten/api/v1/serviceowner/"
localdev: localBaseUrl + serviceOwnerPath,
localdev_docker: localDockerBaseUrl + serviceOwnerPath,
test: testBaseUrl + serviceOwnerPath,
yt01: yt01BaseUrl + serviceOwnerPath,
staging: stagingBaseUrl + serviceOwnerPath,
prod: prodBaseUrl + serviceOwnerPath
},
graphql: {
localdev: "https://localhost:7214/graphql",
localdev_docker: "https://host.docker.internal:7214/graphql",
test: "https://altinn-dev-api.azure-api.net/dialogporten/graphql",
yt01: "https://platform.yt01.altinn.cloud/dialogporten/graphql",
staging: "https://platform.tt02.altinn.no/dialogporten/graphql",
prod: "https://platform.altinn.no/dialogporten/api/v1/graphql"
},
}
localdev: localBaseUrl + graphqlPath,
localdev_docker: localDockerBaseUrl + graphqlPath,
test: testBaseUrl + graphqlPath,
yt01: yt01BaseUrl + graphqlPath,
staging: stagingBaseUrl + graphqlPath,
prod: prodBaseUrl + graphqlPath
},
}
};

export const defaultEndUserOrgNo = "310923044"; // ÆRLIG UROKKELIG TIGER AS
Expand Down

0 comments on commit cb037e4

Please sign in to comment.