From 5bdc1d79dd39691252b41df30985adefda5eb01b Mon Sep 17 00:00:00 2001 From: Andre Hofmeister <9199345+HofmeisterAn@users.noreply.github.com> Date: Wed, 18 Oct 2023 20:44:42 +0200 Subject: [PATCH] chore: Simplify shell script config --- src/Testcontainers.FakeGcsServer/FakeGcsServerBuilder.cs | 4 ++-- .../FakeGcsServerContainerTest.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Testcontainers.FakeGcsServer/FakeGcsServerBuilder.cs b/src/Testcontainers.FakeGcsServer/FakeGcsServerBuilder.cs index cd1d27258..7e482a141 100644 --- a/src/Testcontainers.FakeGcsServer/FakeGcsServerBuilder.cs +++ b/src/Testcontainers.FakeGcsServer/FakeGcsServerBuilder.cs @@ -46,13 +46,13 @@ protected override FakeGcsServerBuilder Init() .WithImage(FakeGcsServerImage) .WithPortBinding(FakeGcsServerPort, true) .WithEntrypoint("/bin/sh", "-c") - .WithCommand("while [ ! -f " + StartupScriptFilePath + " ]; do sleep 0.1; done; /bin/sh " + StartupScriptFilePath) + .WithCommand("while [ ! -f " + StartupScriptFilePath + " ]; do sleep 0.1; done; " + StartupScriptFilePath) .WithWaitStrategy(Wait.ForUnixContainer().UntilMessageIsLogged("server started")) .WithStartupCallback((container, ct) => { const char lf = '\n'; var startupScript = new StringBuilder(); - startupScript.Append("#!/bin/bash"); + startupScript.Append("#!/bin/sh"); startupScript.Append(lf); startupScript.Append("fake-gcs-server "); startupScript.Append("-backend memory "); diff --git a/tests/Testcontainers.FakeGcsServer.Tests/FakeGcsServerContainerTest.cs b/tests/Testcontainers.FakeGcsServer.Tests/FakeGcsServerContainerTest.cs index 61055283d..56a5ea787 100644 --- a/tests/Testcontainers.FakeGcsServer.Tests/FakeGcsServerContainerTest.cs +++ b/tests/Testcontainers.FakeGcsServer.Tests/FakeGcsServerContainerTest.cs @@ -1,6 +1,6 @@ namespace Testcontainers.FakeGcsServer; -public abstract class FakeGcsServerContainerTest : IAsyncLifetime +public sealed class FakeGcsServerContainerTest : IAsyncLifetime { private readonly FakeGcsServerContainer _fakeGcsServerContainer = new FakeGcsServerBuilder().Build();