From 20950a67737deb77b59b56fe3d34e7feab0d532f Mon Sep 17 00:00:00 2001
From: komakkar <komakkar@microsoft.com>
Date: Sun, 6 Sep 2020 19:27:03 +0530
Subject: [PATCH] Changed version in core and removed the Azure implementation
 for PubsubEndpointHMACDescriptor.java

---
 .../api/PubsubEndpointHMACDescriptor.java     | 75 -------------------
 testing/notification-test-core/pom.xml        |  2 +-
 .../api/PubsubEndpointGSADescriptor.java      |  2 +-
 3 files changed, 2 insertions(+), 77 deletions(-)
 delete mode 100644 testing/notification-test-azure/src/test/java/org/opengroup/osdu/notification/api/PubsubEndpointHMACDescriptor.java

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 e41c56660..000000000
--- 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 5d4a558b6..e2779a05b 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 8c4f5a53c..476c1b684 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;
     }
 
-- 
GitLab