diff --git a/testing/notification-test-azure/src/test/java/org/opengroup/osdu/notification/api/PubsubEndpointHMACDescriptor.java b/testing/notification-test-azure/src/test/java/org/opengroup/osdu/notification/api/PubsubEndpointHMACDescriptor.java deleted file mode 100644 index e41c56660f68e4224eb9f600b60cb632bf212905..0000000000000000000000000000000000000000 --- a/testing/notification-test-azure/src/test/java/org/opengroup/osdu/notification/api/PubsubEndpointHMACDescriptor.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright © Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package org.opengroup.osdu.notification.api; - -import org.opengroup.osdu.notification.util.Config; -import org.opengroup.osdu.notification.util.RestDescriptor; -import org.opengroup.osdu.notification.util.TestUtils; - -import java.util.HashMap; -import java.util.Map; - -public class PubsubEndpointHMACDescriptor extends RestDescriptor { - - @Override - public String getPath() { - return "push-handlers/records-changed"; - } - - @Override - public String getHttpMethod() { - return "POST"; - } - - @Override - public String getValidBody() { - return "[{\n" + - " \"id\": \"2425\",\n" + - " \"eventType\": \"recordInserted\",\n" + - " \"subject\": \"myapp/vehicles/motorcycles\",\n" + - " \"data\": {\n" + - " \"attributes\": {\n" + - " \"correlation-id\": \"39137f49-67d6-4001-a6aa-15521ef4f49e\",\n" + - " \"data-partition-id\": \"" + TestUtils.getOsduTenant() + "\"\n" + - " },\n" + - " \"data\": \"W3sia2luZCI6InRlc3RraW5kIiwiaWQiOiJ0ZXN0aWQiLCJvcGVyYXRpb250eXBlIjoiY3JlYXRlIn0seyJraW5kIjoidGVzdGtpbmQyIiwiaWQiOiJ0ZXN0aWQyIiwib3BlcmF0aW9udHlwZSI6InVwZGF0ZSJ9XQ\",\n" + - " \"messageId\": \"136969346945\"\n" + - " },\n" + - " \"dataVersion\": \"1.0\",\n" + - " \"metadataVersion\": \"1\",\n" + - " \"eventTime\": \"2020-08-14T18:04:12+00:00\",\n" + - " \"topic\": \"/subscriptions/c99e2bf3-1777-412b-baba-d823676589c2/resourceGroups/komakkar-OSDU-RG/providers/Microsoft.EventGrid/topics/recordChanged\"\n" + - " }]"; - - } - - @Override - public Map<String,String> getOsduTenantHeaders() { - Map<String, String> headers = new HashMap<>(); - headers.put("Aeg-Subscription-Name", arg()); - headers.put("data-partition-id", Config.Instance().OsduTenant); - return headers; - } - - @Override - public Map<String,String> getCustomerTenantHeaders(){ - Map<String, String> headers = new HashMap<>(); - headers.put("Aeg-Subscription-Name", arg()); - headers.put("data-partition-id", Config.Instance().ClientTenant); - return headers; - } - - -} diff --git a/testing/notification-test-core/pom.xml b/testing/notification-test-core/pom.xml index 5d4a558b6cf6684600daa6a91a6e2afb015be62a..e2779a05bc3f79b58dde9dba6ccfc7d7bfa6479e 100644 --- a/testing/notification-test-core/pom.xml +++ b/testing/notification-test-core/pom.xml @@ -21,7 +21,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu.notification</groupId> <artifactId>notification-test-core</artifactId> - <version>1.0-SNAPSHOT</version> + <version>1.1-SNAPSHOT</version> <name>notification-test-core</name> <description>Integration tests core for notification</description> <packaging>jar</packaging> diff --git a/testing/notification-test-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpointGSADescriptor.java b/testing/notification-test-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpointGSADescriptor.java index 8c4f5a53cbf9e83819abb72af21af28cc5e7dfec..476c1b684115c2bbf9bfc5706b10fbc4fc2d4e43 100644 --- a/testing/notification-test-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpointGSADescriptor.java +++ b/testing/notification-test-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpointGSADescriptor.java @@ -51,7 +51,7 @@ public class PubsubEndpointGSADescriptor extends RestDescriptor { @Override public Map<String,String> getOsduTenantHeaders(){ Map<String, String> headers = new HashMap<>(); - headers.put("data-partition-id", Config.Instance().ClientTenant); + headers.put("data-partition-id", Config.Instance().OsduTenant); return headers; }