Skip to content
Snippets Groups Projects
Commit eabb54b1 authored by harshit aggarwal's avatar harshit aggarwal
Browse files

Merge branch 'master' into HelmChartsAndIstioconfig

parents bb496bb1 94d4388c
No related branches found
No related tags found
1 merge request!20Adding helm charts and Istio config
Pipeline #12344 failed
......@@ -134,21 +134,23 @@ You will need to have the following environment variables defined.
| name | value | description | sensitive? | source |
| --- | --- | --- | --- | --- |
| `DE_OPS_TESTER` | `********` | A base64 encoded google service account json credentials with _ops_ level authorization for OSDU services | yes | output of infrastructure deployment |
| `DE_ADMIN_TESTER` | `********` | A base64 encoded google service account json credentials with _admin_ level authorization for OSDU services | yes | output of infrastructure deployment |
| `DE_EDITOR_TESTER` | `********` | A base64 encoded google service account json credentials with _editor_ level authorization for OSDU services | yes | output of infrastructure deployment |
| `DE_NO_ACCESS_TESTER` | `********` | A base64 encoded google service account json credentials with no authorization for OSDU services | yes | output of infrastructure deployment |
| `REGISTER_BASE_URL` | ex `https://os-register-dot-opendes.appspot.com/api/register/v1` | Register API endpoint | yes | output of infrastructure deployment |
| `ENVIRONMENT` | ex `local` | 'local' for local testing or 'dev' for dev testing | no | output of infrastructure deployment |
| `DE_OPS_TESTER` | `********` | A base64 encoded google service account json credentials with _ops_ level authorization for OSDU services | yes | https://console.cloud.google.com/iam-admin/serviceaccounts |
| `DE_ADMIN_TESTER` | `********` | A base64 encoded google service account json credentials with _admin_ level authorization for OSDU services | yes | https://console.cloud.google.com/iam-admin/serviceaccounts |
| `DE_EDITOR_TESTER` | `********` | A base64 encoded google service account json credentials with _editor_ level authorization for OSDU services | yes | https://console.cloud.google.com/iam-admin/serviceaccounts |
| `DE_NO_ACCESS_TESTER` | `********` | A base64 encoded google service account json credentials with no authorization for OSDU services | yes | https://console.cloud.google.com/iam-admin/serviceaccounts |
| `REGISTER_BASE_URL` | ex `https://os-register-dot-opendes.appspot.com/` | Register API endpoint | no | output of infrastructure deployment |
| `ENVIRONMENT` | ex `local` | 'local' for local testing or 'dev' for dev testing | no | - |
| `SUBSCRIBER_SECRET` | ex `********` | Sensitive secret to run HMAC tests | yes | output of infrastructure deployment |
| `INTEGRATION_TEST_AUDIENCE` | ex `*****.apps.googleusercontent.com` | Client ID for getting access to cloud resources | yes | https://console.cloud.google.com/apis/credentials |
| `CLIENT_TENANT` | ex `opendes` | Client tenant | no | - |
| `OSDU_TENANT` | ex `osdu` | Osdu tenant | no | - |
| `SUBSCRIPTION_ID` | `********` | Subscription id | no | - |
**Entitlements configuration for integration accounts**
| DE_OPS_TESTER | DE_ADMIN_TESTER | DE_EDITOR_TESTER | DE_NO_ACCESS_TESTER
| --- | --- | --- | --- |
| users<br/>service.entitlements.user<br/>users.datalake.ops<br/>data.test1<br/>data.integration.test<br/>users@{tenant1}@{domain}.com | users<br/>service.entitlements.user<br/>users.datalake.admins<br/>data.test1<br/>data.integration.test<br/>users@{tenant1}@{domain}.com | users<br/>service.entitlements.user<br/>users.datalake.editors<br/>data.test1<br/>data.integration.test<br/>users@{tenant1}@{domain}.com | users<br/>service.entitlements.user<br/>data.test1<br/>data.integration.test<br/>users@{tenant1}@{domain}.com
| service.entitlements.user<br/>users.datalake.ops<br/>data.test1<br/>data.integration.test<br/>users@{tenant1}@{domain}.com | service.entitlements.user<br/>users.datalake.admins<br/>data.test1<br/>data.integration.test<br/>users@{tenant1}@{domain}.com | users<br/>service.entitlements.user<br/>users.datalake.editors<br/>data.test1<br/>data.integration.test<br/>users@{tenant1}@{domain}.com | users<br/>service.entitlements.user<br/>data.test1<br/>data.integration.test<br/>users@{tenant1}@{domain}.com
Execute following command to build code and run all the integration tests:
......
......@@ -113,6 +113,25 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.7.201606060606</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
......@@ -41,7 +41,7 @@ public class SwaggerDocumentationConfig {
return new Docket(DocumentationType.SWAGGER_2)
.globalOperationParameters(parameters)
.select()
.apis(RequestHandlerSelectors.basePackage("org.opengroup.osdu.api"))
.apis(RequestHandlerSelectors.basePackage("org.opengroup.osdu.register.api"))
.build()
.securityContexts(Collections.singletonList(securityContext()))
.securitySchemes(Collections.singletonList(apiKey()));
......
......@@ -28,8 +28,8 @@ public class Config {
public static Config Instance() {
String env = System.getProperty("ENVIRONMENT", System.getenv("ENVIRONMENT"));
config.ClientTenant = "nonexistenttenant";
config.OsduTenant = "opendes";
config.ClientTenant = getEnvironmentVariableOrDefaultValue("CLIENT_TENANT","nonexistenttenant");
config.OsduTenant = getEnvironmentVariableOrDefaultValue("OSDU_TENANT","opendes");
if (env.equalsIgnoreCase("LOCAL")) {
config.HostUrl = System.getProperty("REGISTER_BASE_URL", System.getenv("REGISTER_BASE_URL"));
......@@ -37,7 +37,8 @@ public class Config {
config.subscriptionId = System.getProperty("TEST_SUBSCRIPTION_ID", System.getenv("TEST_SUBSCRIPTION_ID"));
config.PushUrl = config.HostUrl;
} else if (env.equalsIgnoreCase("DEV")) {
config.subscriptionId = "cmVjb3Jkcy1jaGFuZ2VkaHR0cHM6Ly9vcy1yZWdpc3Rlci1kb3Qtb3BlbmRlcy5hcHBzcG90LmNvbS9hcGkvcmVnaXN0ZXIvdjEvdGVzdC9jaGFsbGVuZ2UvMQ==";
config.subscriptionId = getEnvironmentVariableOrDefaultValue("SUBSCRIPTION_ID",
"cmVjb3Jkcy1jaGFuZ2VkaHR0cHM6Ly9vcy1yZWdpc3Rlci1kb3Qtb3BlbmRlcy5hcHBzcG90LmNvbS9hcGkvcmVnaXN0ZXIvdjEvdGVzdC9jaGFsbGVuZ2UvMQ==");
config.HostUrl = System.getProperty("REGISTER_BASE_URL", System.getenv("REGISTER_BASE_URL"));
config.securePushUrl = config.HostUrl;
config.PushUrl = config.HostUrl;
......@@ -48,4 +49,16 @@ public class Config {
public boolean isLocalHost() {
return HostUrl.contains("//localhost");
}
private static String getEnvironmentVariableOrDefaultValue(String key, String defaultValue) {
String environmentVariable = getEnvironmentVariable(key);
if (environmentVariable == null) {
environmentVariable = defaultValue;
}
return environmentVariable;
}
private static String getEnvironmentVariable(String propertyKey) {
return System.getProperty(propertyKey, System.getenv(propertyKey));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment