Skip to content
Snippets Groups Projects
Commit a76c6c5c authored by Derek Hudson's avatar Derek Hudson
Browse files

Merge branch 'master' into 'aws-fix-integration-tests'

# Conflicts:
#   devops/aws/pipeline/override-stages.yml
#   provider/notification-azure/pom.xml
parents a21335c2 b17f244e
No related branches found
No related tags found
1 merge request!464Aws fix integration tests
Pipeline #239405 passed with warnings
...@@ -413,6 +413,7 @@ The following software have components provided under the terms of this license: ...@@ -413,6 +413,7 @@ The following software have components provided under the terms of this license:
- Guava: Google Core Libraries for Java (from http://code.google.com/p/guava-libraries, https://github.com/google/guava, https://repo1.maven.org/maven2/com/google/guava/guava) - Guava: Google Core Libraries for Java (from http://code.google.com/p/guava-libraries, https://github.com/google/guava, https://repo1.maven.org/maven2/com/google/guava/guava)
- HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/) - HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/)
- Hibernate Validator (from https://repo1.maven.org/maven2/org/hibernate/hibernate-validator, https://repo1.maven.org/maven2/org/hibernate/validator/hibernate-validator)
- LatencyUtils (from http://latencyutils.github.io/LatencyUtils/) - LatencyUtils (from http://latencyutils.github.io/LatencyUtils/)
- MongoDB Java Driver (from http://mongodb.org/, http://www.mongodb.org, https://www.mongodb.com/) - MongoDB Java Driver (from http://mongodb.org/, http://www.mongodb.org, https://www.mongodb.com/)
- Netty/Common (from https://repo1.maven.org/maven2/io/netty/netty-common) - Netty/Common (from https://repo1.maven.org/maven2/io/netty/netty-common)
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>notification-core</artifactId> <artifactId>notification-core</artifactId>
<name>notification-core</name> <name>notification-core</name>
<description>Core module for the notification service</description> <description>Core module for the notification service</description>
...@@ -31,10 +30,6 @@ ...@@ -31,10 +30,6 @@
</parent> </parent>
<properties> <properties>
<java.version>17</java.version>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.source>${java.version}</maven.compiler.source>
<netty.version>4.1.70.Final</netty.version>
<undertow.version>2.2.19.Final</undertow.version> <undertow.version>2.2.19.Final</undertow.version>
<woodstox-core.version>5.3.0</woodstox-core.version> <woodstox-core.version>5.3.0</woodstox-core.version>
<log4j.version>2.17.1</log4j.version> <log4j.version>2.17.1</log4j.version>
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
<log4j2.version>2.17.1</log4j2.version> <log4j2.version>2.17.1</log4j2.version>
<json-smart.version>2.5.0</json-smart.version> <json-smart.version>2.5.0</json-smart.version>
<openapi.version>1.6.14</openapi.version> <openapi.version>1.6.14</openapi.version>
<spring-webmvc.version>5.3.31</spring-webmvc.version>
<netty.version>4.1.106.Final</netty.version>
<snakeyaml-version>2.0</snakeyaml-version>
</properties> </properties>
<licenses> <licenses>
...@@ -51,11 +54,11 @@ ...@@ -51,11 +54,11 @@
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId> <artifactId>spring-boot-dependencies</artifactId>
<version>2.7.17</version> <version>2.7.17</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
<dependency> <dependency>
...@@ -112,6 +115,12 @@ ...@@ -112,6 +115,12 @@
<groupId>org.springdoc</groupId> <groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId> <artifactId>springdoc-openapi-ui</artifactId>
<version>${openapi.version}</version> <version>${openapi.version}</version>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.plugin</groupId> <groupId>org.springframework.plugin</groupId>
......
...@@ -31,9 +31,6 @@ ...@@ -31,9 +31,6 @@
</parent> </parent>
<properties> <properties>
<java.version>17</java.version>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.source>${java.version}</maven.compiler.source>
<log4j2.version>2.17.1</log4j2.version> <log4j2.version>2.17.1</log4j2.version>
<jackson-databind.version>2.13.4.2</jackson-databind.version> <jackson-databind.version>2.13.4.2</jackson-databind.version>
<jackson.version>2.13.4</jackson.version> <jackson.version>2.13.4</jackson.version>
...@@ -72,6 +69,16 @@ ...@@ -72,6 +69,16 @@
<dependency> <dependency>
<groupId>org.opengroup.osdu.core.aws</groupId> <groupId>org.opengroup.osdu.core.aws</groupId>
<artifactId>os-core-lib-aws</artifactId> <artifactId>os-core-lib-aws</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
</exclusions>
<version>0.25.0-rc3</version> <version>0.25.0-rc3</version>
</dependency> </dependency>
<dependency> <dependency>
...@@ -91,11 +98,6 @@ ...@@ -91,11 +98,6 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId> <artifactId>spring-boot-starter-actuator</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<!-- unit test dependencies --> <!-- unit test dependencies -->
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
......
...@@ -30,9 +30,6 @@ ...@@ -30,9 +30,6 @@
</parent> </parent>
<properties> <properties>
<java.version>17</java.version>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.source>${java.version}</maven.compiler.source>
<jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version> <jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
<osdu.notification-core.version>0.26.0-SNAPSHOT</osdu.notification-core.version> <osdu.notification-core.version>0.26.0-SNAPSHOT</osdu.notification-core.version>
<springframework.version>4.3.0.RELEASE</springframework.version> <springframework.version>4.3.0.RELEASE</springframework.version>
...@@ -47,12 +44,9 @@ ...@@ -47,12 +44,9 @@
<reactor-netty.version>1.1.14</reactor-netty.version> <reactor-netty.version>1.1.14</reactor-netty.version>
<oauth2-oidc-sdk.version>6.0</oauth2-oidc-sdk.version> <oauth2-oidc-sdk.version>6.0</oauth2-oidc-sdk.version>
<woodstox-core.version>5.4.0</woodstox-core.version> <woodstox-core.version>5.4.0</woodstox-core.version>
<spring-webmvc.version>5.3.22</spring-webmvc.version>
<undertow.version>2.2.26.Final</undertow.version> <undertow.version>2.2.26.Final</undertow.version>
<spring-boot-maven-plugin.version>2.7.6</spring-boot-maven-plugin.version> <spring-boot-maven-plugin.version>2.7.6</spring-boot-maven-plugin.version>
<xnio-api.version>3.8.8.Final</xnio-api.version> <xnio-api.version>3.8.8.Final</xnio-api.version>
<netty.version>4.1.101.Final</netty.version>
<snakeyaml-version>2.0</snakeyaml-version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
...@@ -193,6 +187,7 @@ ...@@ -193,6 +187,7 @@
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId> <artifactId>spring-webmvc</artifactId>
<version>${spring-webmvc.version}</version>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -29,9 +29,6 @@ ...@@ -29,9 +29,6 @@
</parent> </parent>
<properties> <properties>
<java.version>17</java.version>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.source>${java.version}</maven.compiler.source>
<spring-boot-maven-plugin.version>2.7.6</spring-boot-maven-plugin.version> <spring-boot-maven-plugin.version>2.7.6</spring-boot-maven-plugin.version>
</properties> </properties>
...@@ -62,6 +59,12 @@ ...@@ -62,6 +59,12 @@
<groupId>org.opengroup.osdu</groupId> <groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-gc</artifactId> <artifactId>core-lib-gc</artifactId>
<version>0.24.0</version> <version>0.24.0</version>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
...@@ -77,6 +80,10 @@ ...@@ -77,6 +80,10 @@
<groupId>com.google.oauth-client</groupId> <groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client</artifactId> <artifactId>google-oauth-client</artifactId>
</exclusion> </exclusion>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
...@@ -116,6 +123,12 @@ ...@@ -116,6 +123,12 @@
<artifactId>oqm</artifactId> <artifactId>oqm</artifactId>
<version>0.24.0</version> <version>0.24.0</version>
</dependency> </dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml-version}</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<dependency> <dependency>
<groupId>org.yaml</groupId> <groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId> <artifactId>snakeyaml</artifactId>
<version>1.33</version> <version>${snakeyaml-version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
......
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" +
"\t\"Type\": \"Notification\",\n" +
"\t\"message\": {\n" +
"\t\"attributes\": {\n" +
"\t\"correlation-id\": \"39137f49-67d6-4001-a6aa-15521ef4f49e\",\n" +
"\t\"data-partition-id\": \"" + TestUtils.getOsduTenant() + "\"\n" +
"\t},\n" +
"\t\"data\": \"W3sia2luZCI6InRlc3RraW5kIiwiaWQiOiJ0ZXN0aWQiLCJvcGVyYXRpb250eXBlIjoiY3JlYXRlIn0seyJraW5kIjoidGVzdGtpbmQyIiwiaWQiOiJ0ZXN0aWQyIiwib3BlcmF0aW9udHlwZSI6InVwZGF0ZSJ9XQ\",\n" +
"\t\"messageId\": \"136969346945\"\n" +
"\t},\n" +
"\t\"subscription\": \""+ arg() +"\"\n" +
"}\n";
}
@Override
public Map<String,String> getOsduTenantHeaders(){
Map<String, String> headers = new HashMap<>();
headers.put("data-partition-id", Config.Instance().OsduTenant);
return headers;
}
@Override
public Map<String,String> getCustomerTenantHeaders(){
Map<String, String> headers = new HashMap<>();
headers.put("data-partition-id", Config.Instance().ClientTenant);
return headers;
}
}
...@@ -8,15 +8,22 @@ import org.junit.Before; ...@@ -8,15 +8,22 @@ import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.opengroup.osdu.core.common.notification.SubscriptionAPIConfig;
import org.opengroup.osdu.core.common.notification.SubscriptionFactory;
import org.opengroup.osdu.notification.util.Config;
import org.opengroup.osdu.notification.util.IBMTestUtils; import org.opengroup.osdu.notification.util.IBMTestUtils;
import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.ClientResponse;
public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests { public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
private static SubscriptionFactory factory;
@BeforeClass @BeforeClass
public static void classSetup() throws Exception { public static void classSetup() throws Exception {
PubsubEndpointHMACTests.classSetup(); descriptor = new PubsubEndpointHMACDescriptor();
//Configure Register Service Client Library
SubscriptionAPIConfig config = SubscriptionAPIConfig.builder().rootUrl(Config.Instance().RegisterServicePath).build();
config.setApiKey("apiKey");
factory = new SubscriptionFactory(config);
} }
@AfterClass @AfterClass
...@@ -36,6 +43,8 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests { ...@@ -36,6 +43,8 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
} }
@Override @Override
@Test
@Ignore
public void should_return400_when_makingHttpRequestWithoutToken()throws Exception{ public void should_return400_when_makingHttpRequestWithoutToken()throws Exception{
ClientResponse response = descriptor.run(getArg(), ""); ClientResponse response = descriptor.run(getArg(), "");
assertEquals(error( response.getEntity(String.class)), 403, response.getStatus()); assertEquals(error( response.getEntity(String.class)), 403, response.getStatus());
......
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