Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pass-core pass-core-test-config artifact #132

Merged
merged 3 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 0 additions & 75 deletions pass-core-test-config/application-test.yml

This file was deleted.

26 changes: 0 additions & 26 deletions pass-core-test-config/saml2/idp-metadata.xml

This file was deleted.

18 changes: 0 additions & 18 deletions pass-core-test-config/saml2/sp-cert.pem

This file was deleted.

28 changes: 0 additions & 28 deletions pass-core-test-config/saml2/sp-key.pem

This file was deleted.

9 changes: 9 additions & 0 deletions pass-data-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@
<version>${maven-model.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.eclipse.pass</groupId>
<artifactId>pass-core-test-config</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -158,6 +165,8 @@
<ignoredUnusedDeclaredDependency>ch.qos.logback:logback-classic</ignoredUnusedDeclaredDependency>
<!-- junit-jupiter is a module containing the junit api jars used directly -->
<ignoredUnusedDeclaredDependency>org.junit.jupiter:junit-jupiter</ignoredUnusedDeclaredDependency>
<!-- Used by ITs via classpath -->
<ignoredUnusedDeclaredDependency>org.eclipse.pass:pass-core-test-config::</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
<ignoredNonTestScopedDependencies>
<ignoredNonTestScopedDependency>ch.qos.logback:logback-classic:</ignoredNonTestScopedDependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public class JsonApiPassClientIT {

System.setProperty("pass.core.url", "http://localhost:8080");
System.setProperty("pass.core.user", "backend");
System.setProperty("pass.core.password", "backend");
System.setProperty("pass.core.password", "moo");

Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
root.setLevel(Level.WARN);
Expand All @@ -109,10 +109,15 @@ public class JsonApiPassClientIT {
@Container
private static final GenericContainer<?> PASS_CORE_CONTAINER = new GenericContainer<>(PASS_CORE_IMG)
.withCopyFileToContainer(
MountableFile.forHostPath("../pass-core-test-config/"),
"/tmp/pass-core-test-config/"
MountableFile.forClasspathResource("/saml2/"),
"/tmp/saml2/"
)
.withEnv("PASS_CORE_JAVA_OPTS", "-Dspring.config.import=file:/tmp/pass-core-test-config/application-test.yml")
.withCopyFileToContainer(
MountableFile.forClasspathResource("/application-test.yml"),
"/tmp/application-test.yml"
)
.withEnv("PASS_SAML_PATH", "file:/tmp/")
.withEnv("PASS_CORE_JAVA_OPTS", "-Dspring.config.import=file:/tmp/application-test.yml")
.withCreateContainerCmdModifier(cmd -> {
cmd.getHostConfig().withPortBindings(new PortBinding(Ports.Binding.bindPort(8080),
new ExposedPort(8080)));
Expand Down
6 changes: 6 additions & 0 deletions pass-deposit-services/deposit-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.eclipse.pass</groupId>
<artifactId>pass-core-test-config</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
properties = {
"pass.client.url=http://localhost:8080",
"pass.client.user=backend",
"pass.client.password=backend"
"pass.client.password=moo"
})
@Testcontainers
@DirtiesContext
Expand All @@ -95,11 +95,16 @@ public abstract class AbstractDepositSubmissionIT {
@Container
protected static final GenericContainer<?> PASS_CORE_CONTAINER = new GenericContainer<>(PASS_CORE_IMG)
.withCopyFileToContainer(
MountableFile.forHostPath("../../pass-core-test-config/"),
"/tmp/pass-core-test-config/"
MountableFile.forClasspathResource("/saml2/"),
"/tmp/saml2/"
)
.withEnv("PASS_CORE_JAVA_OPTS", "-Dspring.config.import=file:/tmp/pass-core-test-config/application-test.yml")
.waitingFor(Wait.forHttp("/data/grant").forStatusCode(200).withBasicCredentials("backend", "backend"))
.withCopyFileToContainer(
MountableFile.forClasspathResource("/application-test.yml"),
"/tmp/application-test.yml"
)
.withEnv("PASS_SAML_PATH", "file:/tmp/")
.withEnv("PASS_CORE_JAVA_OPTS", "-Dspring.config.import=file:/tmp/application-test.yml")
.waitingFor(Wait.forHttp("/data/grant").forStatusCode(200).withBasicCredentials("backend", "moo"))
.withExposedPorts(8080);

@Autowired protected SubmissionTestUtil submissionTestUtil;
Expand Down
2 changes: 2 additions & 0 deletions pass-deposit-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@
<!-- mockito-inline is needed to mock final classes -->
<ignoredUnusedDeclaredDependency>org.mockito:mockito-inline:</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>io.awspring.cloud:spring-cloud-aws-starter-s3:</ignoredUnusedDeclaredDependency>
<!-- Used by ITs via classpath -->
<ignoredUnusedDeclaredDependency>org.eclipse.pass:pass-core-test-config::</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
<ignoredNonTestScopedDependencies>
<!-- junit-jupiter is a module containing the junit api jars used directly -->
Expand Down
8 changes: 8 additions & 0 deletions pass-grant-loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@
<version>${maven-model.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.pass</groupId>
<artifactId>pass-core-test-config</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -299,6 +305,8 @@
<ignoredUnusedDeclaredDependency>org.projectlombok:lombok:</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.mockito:mockito-inline:</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>com.oracle.database.jdbc::</ignoredUnusedDeclaredDependency>
<!-- Used by ITs via classpath -->
<ignoredUnusedDeclaredDependency>org.eclipse.pass:pass-core-test-config::</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,16 @@ public abstract class AbstractIntegrationTest {
@Container
protected static final GenericContainer<?> PASS_CORE_CONTAINER = new GenericContainer<>(PASS_CORE_IMG)
.withCopyFileToContainer(
MountableFile.forHostPath("../pass-core-test-config/"),
"/tmp/pass-core-test-config/"
MountableFile.forClasspathResource("/saml2/"),
"/tmp/saml2/"
)
.withEnv("PASS_CORE_JAVA_OPTS", "-Dspring.config.import=file:/tmp/pass-core-test-config/application-test.yml")
.waitingFor(Wait.forHttp("/data/grant").forStatusCode(200).withBasicCredentials("backend", "backend"))
.withCopyFileToContainer(
MountableFile.forClasspathResource("/application-test.yml"),
"/tmp/application-test.yml"
)
.withEnv("PASS_SAML_PATH", "file:/tmp/")
.withEnv("PASS_CORE_JAVA_OPTS", "-Dspring.config.import=file:/tmp/application-test.yml")
.waitingFor(Wait.forHttp("/data/grant").forStatusCode(200).withBasicCredentials("backend", "moo"))
.withExposedPorts(8080);

@SpyBean protected PassClient passClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ pass.grant.update.ts.path=file:./src/test/resources/grant_update_timestamps
# pass-core properties
pass.client.url=http://localhost:8080/
pass.client.user=backend
pass.client.password=backend
pass.client.password=moo
7 changes: 7 additions & 0 deletions pass-journal-loader/pass-journal-loader-nih/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@
<version>${maven-model.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.eclipse.pass</groupId>
<artifactId>pass-core-test-config</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,22 @@ public class DepositIT {

System.setProperty("pass.core.url", "http://localhost:8080");
System.setProperty("pass.core.user", "backend");
System.setProperty("pass.core.password", "backend");
System.setProperty("pass.core.password", "moo");
}

@Container
private static final GenericContainer<?> PASS_CORE_CONTAINER = new GenericContainer<>(PASS_CORE_IMG)
.withCopyFileToContainer(
MountableFile.forHostPath("../../pass-core-test-config/"),
"/tmp/pass-core-test-config/"
MountableFile.forClasspathResource("/saml2/"),
"/tmp/saml2/"
)
.withEnv("PASS_CORE_JAVA_OPTS", "-Dspring.config.import=file:/tmp/pass-core-test-config/application-test.yml")
.waitingFor(Wait.forHttp("/data/grant").forStatusCode(200).withBasicCredentials("backend", "backend"))
.withCopyFileToContainer(
MountableFile.forClasspathResource("/application-test.yml"),
"/tmp/application-test.yml"
)
.withEnv("PASS_SAML_PATH", "file:/tmp/")
.withEnv("PASS_CORE_JAVA_OPTS", "-Dspring.config.import=file:/tmp/application-test.yml")
.waitingFor(Wait.forHttp("/data/grant").forStatusCode(200).withBasicCredentials("backend", "moo"))
.withCreateContainerCmdModifier(cmd -> {
cmd.getHostConfig().withPortBindings(new PortBinding(Ports.Binding.bindPort(8080),
new ExposedPort(8080)));
Expand Down
2 changes: 2 additions & 0 deletions pass-journal-loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@
<ignoredUnusedDeclaredDependencies>
<!-- junit-jupiter is a module containing the junit api jars used directly -->
<ignoredUnusedDeclaredDependency>org.junit.jupiter:junit-jupiter:</ignoredUnusedDeclaredDependency>
<!-- Used by ITs via classpath -->
<ignoredUnusedDeclaredDependency>org.eclipse.pass:pass-core-test-config::</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
Expand Down
7 changes: 7 additions & 0 deletions pass-nihms-loader/nihms-data-harvest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.eclipse.pass</groupId>
<artifactId>pass-core-test-config</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
Expand Down
6 changes: 6 additions & 0 deletions pass-nihms-loader/nihms-data-transform-load/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@
<version>${wiremock-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.pass</groupId>
<artifactId>pass-core-test-config</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Loading
Loading