Skip to content
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
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@

<!-- Module Dependency Versions -->
<assertj.version>3.27.7</assertj.version>
<base.version>0.22.1</base.version>
<base.version>0.23.0</base.version>
<byte-buddy.version>1.18.4</byte-buddy.version>
<codemodel.version>0.20.1</codemodel.version>
<codemodel.version>0.21.0</codemodel.version>
<jackson-core.version>2.21.2</jackson-core.version>
<junit.version>6.0.3</junit.version>
<jakarta-inject.version>2.0.1</jakarta-inject.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,10 +636,10 @@ void shouldCopyAFileToAContainer()

try (var session = createSession()) {
final var image = session.images()
.get(RABBITMQ_IMAGE)
.get(ALPINE_IMAGE)
.orElseThrow(() -> new AssertionError("Failed to get the required image"));

try (var container = image.start()) {
try (var container = image.start(Command.of("sleep", "60"))) {

Eventually.assertThat(container.onStart())
.isCompleted();
Expand All @@ -650,13 +650,19 @@ void shouldCopyAFileToAContainer()
assertThat(container.id())
.isNotNull();

// create a /tmp/test folder in the container
Eventually.assertThat(container
.createExecutable("mkdir", "/tmp/test")
.execute()
.onExit())
// create a /tmp/test folder in the container; withTerminal(true) ensures Detach:false so
// onExit() tracks actual process completion rather than just exec launch
final var mkdirExecution = container
.createExecutable("mkdir", "/tmp/test")
.withTerminal(true)
.execute();

Eventually.assertThat(mkdirExecution.onExit())
.isCompleted();

assertThat(mkdirExecution.exitValue().getAsInt())
.isEqualTo(0);

// establish a temporary folder and a temporary file in the folder, tar the folder and send it to the

// Create temp dir and a file inside it
Expand Down
Loading