diff --git a/provider/storage-gcp/README.md b/provider/storage-gcp/README.md index 3bca0664fa4458d6bd3c0c7f7ec94e9d91e94119..93d2ccaa2ffb3e98b359ae065b479fd29f899909 100644 --- a/provider/storage-gcp/README.md +++ b/provider/storage-gcp/README.md @@ -28,6 +28,19 @@ In order to run the service locally or remotely, you will need to have the follo | `GOOGLE_AUDIENCES` | ex `*****.apps.googleusercontent.com` | Client ID for getting access to cloud resources | yes | https://console.cloud.google.com/apis/credentials | | `GOOGLE_APPLICATION_CREDENTIALS` | ex `/path/to/directory/service-key.json` | Service account credentials, you only need this if running locally | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | +###Requirements for requests. +Record identifiers cannot contain a space character. +At the same time, they may contain a % character, which, when combined with subsequent numeric characters, +may cause the application to misinterpret that combination. +For example, the "%20" combination will be interpreted as a space " " character. +To correctly transfer such an identifier, you should additionally perform the url-encode operation on it. +This functionality can be built into the front-end application, or you can use an online url-encoder +tool ( eg.: https://www.urlencoder.org/). +Thus, having ID "osdu:work-product-component--WellboreMarkerSet:3D%20Kirchhoff%20DepthMigration" (with %20 combination) +you should url-encode it and request +"osdu%3Awork-product-component--WellboreMarkerSet%3A3D%2520Kirchhoff%2520DepthMigration" instead. + + ### Run Locally Check that maven is installed: diff --git a/provider/storage-gcp/src/main/resources/application.properties b/provider/storage-gcp/src/main/resources/application.properties index bff7492f7eed6d7b344809193bd594dd4447dfdb..4927057838190e9f3c30446a02973c32059d0ca6 100644 --- a/provider/storage-gcp/src/main/resources/application.properties +++ b/provider/storage-gcp/src/main/resources/application.properties @@ -11,4 +11,7 @@ JAVA_GC_OPTS=-XX:+UseG1GC -XX:+UseStringDeduplication -XX:InitiatingHeapOccupanc PUBSUB_SEARCH_TOPIC=records-changed REDIS_GROUP_PORT=6379 -REDIS_STORAGE_PORT=6379 \ No newline at end of file +REDIS_STORAGE_PORT=6379 + +# Spring boot config +osdu.spring.config.enableEncodedPercent=true \ No newline at end of file diff --git a/testing/storage-test-gcp/src/test/java/org/opengroup/osdu/storage/records/TestRecordsApiAcceptance.java b/testing/storage-test-gcp/src/test/java/org/opengroup/osdu/storage/records/TestRecordsApiAcceptance.java index 727dfc79c33ecaccd8a59b7f281f97d181b8f6c6..66ba86646cdee50a5e2517b36101385ae4de8501 100644 --- a/testing/storage-test-gcp/src/test/java/org/opengroup/osdu/storage/records/TestRecordsApiAcceptance.java +++ b/testing/storage-test-gcp/src/test/java/org/opengroup/osdu/storage/records/TestRecordsApiAcceptance.java @@ -18,6 +18,7 @@ import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; +import org.opengroup.osdu.storage.util.ConfigUtils; import org.opengroup.osdu.storage.util.GCPTestUtils; public class TestRecordsApiAcceptance extends RecordsApiAcceptanceTests { @@ -38,6 +39,7 @@ public class TestRecordsApiAcceptance extends RecordsApiAcceptanceTests { @Override public void setup() throws Exception { this.testUtils = new GCPTestUtils(); + this.configUtils = new ConfigUtils("test.properties"); } @After diff --git a/testing/storage-test-gcp/src/test/resources/test.properties b/testing/storage-test-gcp/src/test/resources/test.properties new file mode 100644 index 0000000000000000000000000000000000000000..0f5f9384154e19723502a36358c9335a2247133c --- /dev/null +++ b/testing/storage-test-gcp/src/test/resources/test.properties @@ -0,0 +1 @@ +enableEncodedPercentInURL=true \ No newline at end of file