Skip to content

Commit

Permalink
Merge branch 'master' into finos-migeration-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PayalKhanna authored Jun 17, 2024
2 parents 61ff860 + f94cecc commit 51f18c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 52 deletions.
48 changes: 1 addition & 47 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
<junit.version>5.9.1</junit.version>
<junit-platform-commons.version>1.9.1</junit-platform-commons.version>
<mockito.version>5.1.1</mockito.version>
<hamcrest.version>2.2</hamcrest.version>
<logback.version>1.4.7</logback.version>

<!-- plugins -->
Expand Down Expand Up @@ -234,11 +233,6 @@
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand All @@ -259,11 +253,6 @@
<artifactId>junit-platform-commons</artifactId>
<version>${junit-platform-commons.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>${hamcrest.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-bom</artifactId>
Expand All @@ -286,26 +275,6 @@
<artifactId>kotlin-test-junit</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock</artifactId>
<version>${jmock.version}</version>
<exclusions>
<exclusion>
<artifactId>asm</artifactId>
<groupId>org.ow2.asm</groupId>
</exclusion>
<exclusion>
<artifactId>jsr305</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down Expand Up @@ -336,10 +305,7 @@
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>

<!-- add junit in non-test scope -->
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -357,22 +323,10 @@
<groupId>co.unruly</groupId>
<artifactId>java-8-matchers</artifactId>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit</artifactId>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;

public class LatestSchemesImportTest {

private static final String SCHEMA_PATH = "src/main/resources/coding-schemes/fpml";
private static final String CODE_LIST_ZIP = "src/main/resources/coding-schemes/fpml/codelist.zip";
private static final String CODE_LIST = "src/main/resources/coding-schemes/fpml/codelist";
private static final boolean WRITE_LATEST_VERSION = Optional.ofNullable(System.getenv("WRITE_EXPECTATIONS"))
.map(Boolean::parseBoolean).orElse(false);
.map(Boolean::parseBoolean).orElse(false);

@Test
public void downloadLatestVersions() throws IOException, NoSuchAlgorithmException {
Expand All @@ -55,8 +54,8 @@ public void downloadLatestVersions() throws IOException, NoSuchAlgorithmExceptio
try (FileOutputStream fos = new FileOutputStream(LatestSchemesImportTest.CODE_LIST_ZIP)) {
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
String checksum = getZipCheckSum(Paths.get(CODE_LIST_ZIP));
assertThat("CodeList zip has been updated, run again with WRITE_LATEST_VERSION enabled then update expected checksum",
checksum, equalTo("f4e20644ca711aaa443c03980cb8b785"));

assertEquals("f4e20644ca711aaa443c03980cb8b785", checksum, "CodeList zip has been updated, run again with WRITE_LATEST_VERSION enabled then update expected checksum");

if (WRITE_LATEST_VERSION) {
//Unzip from CodeList just being downloaded
Expand Down

0 comments on commit 51f18c9

Please sign in to comment.