Skip to content

Commit

Permalink
Add debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
breskeby committed Nov 20, 2023
1 parent bb6766f commit 4a2b53e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.gradle.api.file.FileCollection;
import org.gradle.api.tasks.testing.Test;

import java.nio.file.Path;
import java.util.Collection;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.BiConsumer;
Expand Down Expand Up @@ -51,7 +52,12 @@ public void apply(Project project) {
Collection<String> services = fixtureApps.getFixtureApplications().get(appKey);
if (services.isEmpty() == false) {
String appHomeKey = "fixture." + appKey + ".home";
applySysProps.accept(appHomeKey, test.getWorkingDir().toPath().relativize(file.toPath()).toString());

System.out.println("appHomeKey = " + appHomeKey);
Path relativize = test.getWorkingDir().toPath().relativize(file.toPath());
System.out.println("relativize.toFile().getPath() = " + relativize.toFile().getPath());

applySysProps.accept(appHomeKey, relativize.toString());
AtomicInteger index = new AtomicInteger();
services.forEach(
(serviceName) -> applySysProps.accept("fixture." + appKey + ".service." + index.getAndIncrement(), serviceName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ private ComposeContainer createContainer(List<String> services) {
private static File resolveFixtureHome() {
String userHomeProperty = System.getProperty("fixture.minio-fixture.home");
File home = new File(userHomeProperty);
return new File(home, "docker-compose.yml");

File file = new File(home, "docker-compose.yml");
System.out.println("file = " + file.getPath() + " -- " + file.exists());
return file;
}

public MinioFixtureTestContainer(List<String> services) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public enum S3FixtureType {
public S3HttpFixtureRule(boolean enabled, List<S3FixtureType> enabledFixtures) {
this.enabled = enabled;
this.enabledFixtures = enabledFixtures;

}

public String getAddress(S3FixtureType fixtureRuleType) {
Expand Down

0 comments on commit 4a2b53e

Please sign in to comment.