Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: int api url #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/main/java/org/dvsa/testing/lib/url/api/URL.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ public class URL extends URLBase {
public static java.net.URL build(@NotNull String scheme, @NotNull EnvironmentType environment, @NotNull String path) {
// TODO: find out how prod url looks and incorporate findings
if (environment == EnvironmentType.LOCAL) {
setURL(String.format("%s://olcs-backend/api/%s",scheme, path));
setURL(String.format("%s://olcs-backend/api/%s", scheme, path));
} else {
setURL(String.format("%s://api.%s.olcs.dev-dvsacloud.uk/api/%s", scheme, environment, path));
String baseUrl = String.format("%s://api.%s.olcs.dev-dvsacloud.uk/api/%s", scheme, environment, path);
if (environment == EnvironmentType.INTEGRATION) {
baseUrl = baseUrl.replace(".dev-", ".");
}
setURL(baseUrl);
}
return getURL();
}
Expand Down