Skip to content

Commit 096b26e

Browse files
committed
fix: use rustfs for s3 tests instead of localstack (#1854)
### Motivation The S3 impl we are using for tests of the s3 storage module now requires auth and thus tests are failing in pipelines and locally. ### Modification Switched from localstack to rustfs ### Result Pipeline runs the tests again
1 parent 4e59a39 commit 096b26e

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

modules/storage-s3/impl/src/test/java/eu/cloudnetservice/modules/s3/S3TemplateStorageTest.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,21 @@
4141
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
4242
class S3TemplateStorageTest {
4343

44-
// default localstack port, maps all services to that port
45-
private static final int PORT = 4566;
44+
// default rustfs port
45+
private static final int PORT = 9000;
4646
private static final ServiceTemplate TEMPLATE = ServiceTemplate.builder()
4747
.prefix("global")
4848
.name("proxy")
4949
.storage("s3")
5050
.build();
5151

5252
@Container
53-
private static final GenericContainer<?> S3 = new GenericContainer<>("localstack/localstack:latest")
53+
private static final GenericContainer<?> S3 = new GenericContainer<>("rustfs/rustfs:latest")
5454
.withExposedPorts(PORT)
55-
.withEnv("SERVICES", "s3")
56-
.waitingFor(Wait.forLogMessage(".*Ready\\.\n", 1));
55+
.withEnv("RUSTFS_ACCESS_KEY", "accesskey")
56+
.withEnv("RUSTFS_SECRET_KEY", "secretkey")
57+
.withEnv("RUSTFS_ADDRESS", ":" + PORT)
58+
.waitingFor(Wait.forListeningPort());
5759

5860
private static S3TemplateStorage storage;
5961

0 commit comments

Comments
 (0)