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

Merge branch 'master' into HelmChartsAndIstioconfig

parents 33fc44b6 6d604528
No related branches found
No related tags found
1 merge request!20Adding helm charts and Istio config
Pipeline #14478 passed with warnings
......@@ -23,6 +23,7 @@ import org.opengroup.osdu.register.util.TestPayloadReader;
public class CreateSubscriberDescriptor extends RestDescriptor {
private final TestPayloadReader reader = new TestPayloadReader();
private static String topicName = System.getProperty("TEST_TOPIC_NAME", System.getenv("TEST_TOPIC_NAME"));
@Override
public String getPath() {
......@@ -48,12 +49,17 @@ public class CreateSubscriberDescriptor extends RestDescriptor {
url = pushPath;
}
String secret = Config.Instance().SUBSCRIBER_SECRET;
if(Strings.isNullOrEmpty(topicName)) {
topicName = "records-changed";
}
return "{\n" +
"\t\"id\": \"" + getArg() + "\",\n" +
"\t\"name\": \"My listener\",\n" +
"\t\"description\": \"My test listener.\",\n" +
"\t\"pushEndpoint\":\"" + url + "\",\n" +
"\t\"topic\":\"records-changed\",\n" +
"\t\"topic\":\"" + topicName + "\",\n" +
"\t\"secret\": {\n" +
"\t\t\"secretType\" : \"HMAC\",\n" +
"\t\"value\":\"" + secret + "\"\n" +
......
......@@ -31,6 +31,7 @@ import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import static org.junit.Assert.assertEquals;
......@@ -81,12 +82,14 @@ public abstract class TestUtils {
public static Map<String, String> getOsduTenantHeaders() {
Map<String, String> headers = new HashMap<>();
headers.put("data-partition-id", getOsduTenant());
headers.put("correlation-id", UUID.randomUUID().toString());
return headers;
}
public static Map<String, String> getCustomerTenantHeaders() {
Map<String, String> headers = new HashMap<>();
headers.put("data-partition-id", getCustomerTenant());
headers.put("correlation-id", UUID.randomUUID().toString());
return headers;
}
......
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