Commit 0ea925ef authored by Matt Wise's avatar Matt Wise
Browse files

get schema authority from env or use default

parent 0070e951
Pipeline #35743 failed with stages
in 2 minutes and 3 seconds
......@@ -211,7 +211,7 @@ public abstract class Dataset extends TestBase {
Record datasetRegistry = new Record();
datasetRegistry.setId(id);
datasetRegistry.setKind(String.format("%s:wks:dataset--File.Generic:1.0.0", TenantUtils.getTenantName()));
datasetRegistry.setKind(String.format("%s:wks:dataset--File.Generic:1.0.0", TestUtils.getSchemaAuthority()));
//set legal
Legal legal = new Legal();
......
......@@ -51,6 +51,9 @@ public abstract class TestUtils {
public static final String datasetBaseUrl = System.getenv("DATASET_BASE_URL");
public static final String entitlementsBaseUrl = System.getenv("ENTITLEMENTS_BASE_URL");
public static final String providerKey = System.getenv("PROVIDER_KEY");
private static final String schemaAuthority = System.getenv("SCHEMA_AUTHORITY");
private static final String DEFAULT_SCHEMA_AUTHORITY = "osdu";
public static final String getDomain() {
return domain;
......@@ -60,6 +63,14 @@ public abstract class TestUtils {
return providerKey;
}
public static final String getSchemaAuthority() {
if (schemaAuthority == null) {
return DEFAULT_SCHEMA_AUTHORITY;
}
return schemaAuthority;
}
public static String getApiPath(String api) throws Exception {
URL mergedURL = new URL(datasetBaseUrl + api);
System.out.println(mergedURL.toString());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment