Skip to content

Commit af88ba2

Browse files
committed
refactor: rename localStackS3 references to s3 across codebase
- Unified naming conventions by replacing `localStackS3` with `s3` in configurations, tests, and APIs. - Updated TOML files and related test configurations to reflect the new terminology. - Adjusted endpoints, services, and default image variables to align with the new naming scheme. - Ensured backward compatibility by updating relevant user documentation and examples.
1 parent c251b53 commit af88ba2

30 files changed

Lines changed: 180 additions & 168 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Use `@BigDataTest` in a JUnit 5 test and request `BigDataTestKit` as a parameter
3636
hiveMetastore = true,
3737
kafka = true,
3838
schemaRegistry = true,
39-
localStackS3 = true,
39+
s3 = true,
4040
)
4141
class MyIntegrationTest {
4242
@Test
@@ -53,7 +53,7 @@ For declarative test setup, add `@BigDataExtensions` with TOML config:
5353

5454
```kotlin
5555
@BigDataExtensions("classpath:bigdata-extensions.toml")
56-
@BigDataTest(hdfs = true, kafka = true, schemaRegistry = true, localStackS3 = true)
56+
@BigDataTest(hdfs = true, kafka = true, schemaRegistry = true, s3 = true)
5757
class MyIntegrationTest
5858
```
5959

@@ -78,9 +78,9 @@ HTTP services can be exposed through an HAProxy TLS gateway from TOML:
7878

7979
```toml
8080
[services]
81-
localStackS3 = true
81+
s3 = true
8282

83-
[localStackS3Tls]
83+
[s3Tls]
8484
enabled = true
8585
domain = "localhost"
8686
```
@@ -106,7 +106,7 @@ Optional CLI health checks can run after container startup:
106106
```toml
107107
[healthChecks]
108108
hdfs = "cli"
109-
localStackS3 = "cli"
109+
s3 = "cli"
110110
```
111111

112112
## Run Examples

autoconfigure/src/main/kotlin/org/openprojectx/bigdata/test/autoconfigure/BigDataTestAutoConfiguration.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class BigDataTestAutoConfiguration {
3636
hdfsNameNode = properties.ports.hdfsNameNode,
3737
hdfsDataNode = properties.ports.hdfsDataNode,
3838
hdfsWeb = properties.ports.hdfsWeb,
39-
localStackS3 = properties.ports.localstackS3,
39+
s3 = properties.ports.s3,
4040
),
4141
)
4242
.withContainerLogs(
@@ -166,12 +166,12 @@ class BigDataTestAutoConfiguration {
166166
)
167167
}
168168

169-
if (properties.localstackS3.enabled) {
170-
builder.withLocalStackS3(
169+
if (properties.s3.enabled) {
170+
builder.withS3(
171171
ObjectStoreOptions(
172172
enabled = true,
173-
image = properties.localstackS3.image,
174-
tls = properties.localstackS3.tls.toCore(),
173+
image = properties.s3.image,
174+
tls = properties.s3.tls.toCore(),
175175
),
176176
)
177177
}
@@ -199,7 +199,7 @@ class BigDataTestAutoConfiguration {
199199
hdfs.webTls.enabled ||
200200
kafka.schemaRegistryTls.enabled ||
201201
kafka.kafkaUiTls.enabled ||
202-
localstackS3.tls.enabled ||
202+
s3.tls.enabled ||
203203
fakeGcs.tls.enabled
204204

205205
private fun String.toBigDataService(): BigDataService =

autoconfigure/src/main/kotlin/org/openprojectx/bigdata/test/autoconfigure/BigDataTestProperties.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import org.openprojectx.bigdata.test.core.ClouderaHmsDatabaseType
66

77
import org.openprojectx.bigdata.test.core.ContainerLogMode
88
import org.openprojectx.bigdata.test.core.DEFAULT_FAKE_GCS_IMAGE
9-
import org.openprojectx.bigdata.test.core.DEFAULT_LOCALSTACK_S3_IMAGE
9+
import org.openprojectx.bigdata.test.core.DEFAULT_S3_IMAGE
1010
import org.springframework.boot.context.properties.ConfigurationProperties
1111

1212
@ConfigurationProperties("bigdata.test")
@@ -19,7 +19,7 @@ data class BigDataTestProperties(
1919
var hiveMetastore: HiveMetastore = HiveMetastore(),
2020
var clouderaHms: ClouderaHms = ClouderaHms(),
2121
var kafka: Kafka = Kafka(),
22-
var localstackS3: ObjectStore = ObjectStore(image = DEFAULT_LOCALSTACK_S3_IMAGE),
22+
var s3: ObjectStore = ObjectStore(image = DEFAULT_S3_IMAGE),
2323
var fakeGcs: ObjectStore = ObjectStore(image = DEFAULT_FAKE_GCS_IMAGE),
2424
var containerLogs: ContainerLogs = ContainerLogs(),
2525
var containerLogLevels: Map<String, String> = emptyMap(),
@@ -57,7 +57,7 @@ data class BigDataTestProperties(
5757
var hdfsNameNode: Int = 0,
5858
var hdfsDataNode: Int = 0,
5959
var hdfsWeb: Int = 0,
60-
var localstackS3: Int = 0,
60+
var s3: Int = 0,
6161
)
6262

6363
data class Hdfs(

core/src/main/kotlin/org/openprojectx/bigdata/test/core/BigDataContainerLogLevels.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ object BigDataContainerLogLevels {
2727
BigDataService.KAFKA_UI -> mapOf(
2828
"LOGGING_LEVEL_ROOT" to normalized,
2929
)
30-
BigDataService.LOCALSTACK_S3 -> mapOf(
31-
"LS_LOG" to normalized.lowercase(),
32-
"DEBUG" to if (normalized == "DEBUG" || normalized == "TRACE") "1" else "0",
30+
BigDataService.S3 -> mapOf(
31+
"QUARKUS_LOG_LEVEL" to normalized,
3332
)
3433
BigDataService.FAKE_GCS -> mapOf(
3534
"LOG_LEVEL" to normalized,

core/src/main/kotlin/org/openprojectx/bigdata/test/core/BigDataService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ enum class BigDataService(
4848
defaultPorts = mapOf("http" to 8080, "https" to 443),
4949
endpointProperties = setOf("bigdata.test.kafka-ui.url"),
5050
),
51-
LOCALSTACK_S3(
52-
defaultPorts = mapOf("edge" to 4566, "https" to 443),
51+
S3(
52+
defaultPorts = mapOf("http" to 4566, "https" to 443),
5353
endpointProperties = setOf(
5454
"spring.cloud.aws.s3.endpoint",
5555
"aws.endpoint-url.s3",

core/src/main/kotlin/org/openprojectx/bigdata/test/core/BigDataTestKit.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class BigDataTestKit private constructor(
5757
private var hdfs = HdfsOptions()
5858
private var hiveMetastore = HiveMetastoreOptions()
5959
private var kafka = KafkaOptions()
60-
private var localStackS3 = ObjectStoreOptions()
60+
private var s3 = ObjectStoreOptions()
6161
private var fakeGcs = ObjectStoreOptions(image = DEFAULT_FAKE_GCS_IMAGE)
6262
private var portBindings = PortBindingOptions()
6363
private var containerLogs = ContainerLogOptions()
@@ -89,8 +89,8 @@ class BigDataTestKit private constructor(
8989
fun withKafka(options: KafkaOptions = KafkaOptions(enabled = true)): Builder =
9090
apply { kafka = options.copy(enabled = true) }
9191

92-
fun withLocalStackS3(options: ObjectStoreOptions = ObjectStoreOptions(enabled = true)): Builder =
93-
apply { localStackS3 = options.copy(enabled = true) }
92+
fun withS3(options: ObjectStoreOptions = ObjectStoreOptions(enabled = true)): Builder =
93+
apply { s3 = options.copy(enabled = true) }
9494

9595
fun withFakeGcs(options: ObjectStoreOptions = ObjectStoreOptions(enabled = true, image = DEFAULT_FAKE_GCS_IMAGE)): Builder =
9696
apply { fakeGcs = options.copy(enabled = true) }
@@ -164,7 +164,7 @@ class BigDataTestKit private constructor(
164164
hdfs = hdfs,
165165
hiveMetastore = hiveMetastore,
166166
kafka = kafka,
167-
localStackS3 = localStackS3,
167+
s3 = s3,
168168
fakeGcs = fakeGcs,
169169
portBindings = portBindings,
170170
containerLogs = containerLogs,

core/src/main/kotlin/org/openprojectx/bigdata/test/core/BigDataTestKitOptions.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package org.openprojectx.bigdata.test.core
22

33
import org.testcontainers.containers.GenericContainer
44

5-
const val DEFAULT_LOCALSTACK_S3_IMAGE = "ghcr.io/openprojectx/dockerhub/floci/floci:1.5.32"
5+
const val DEFAULT_S3_IMAGE = "ghcr.io/openprojectx/dockerhub/floci/floci:1.5.32"
66
const val DEFAULT_FAKE_GCS_IMAGE = "ghcr.io/openprojectx/dockerhub/floci/floci-gcp:0.5.0"
77

88
data class BigDataTestKitOptions(
@@ -11,7 +11,7 @@ data class BigDataTestKitOptions(
1111
val hdfs: HdfsOptions = HdfsOptions(),
1212
val hiveMetastore: HiveMetastoreOptions = HiveMetastoreOptions(),
1313
val kafka: KafkaOptions = KafkaOptions(),
14-
val localStackS3: ObjectStoreOptions = ObjectStoreOptions(),
14+
val s3: ObjectStoreOptions = ObjectStoreOptions(),
1515
val fakeGcs: ObjectStoreOptions = ObjectStoreOptions(image = DEFAULT_FAKE_GCS_IMAGE),
1616
val portBindings: PortBindingOptions = PortBindingOptions(),
1717
val containerLogs: ContainerLogOptions = ContainerLogOptions(),
@@ -151,7 +151,7 @@ data class KafkaOptions(
151151

152152
data class ObjectStoreOptions(
153153
val enabled: Boolean = false,
154-
val image: String = DEFAULT_LOCALSTACK_S3_IMAGE,
154+
val image: String = DEFAULT_S3_IMAGE,
155155
val tls: HttpTlsOptions = HttpTlsOptions(),
156156
)
157157

@@ -170,8 +170,8 @@ data class PortBindingOptions(
170170
val schemaRegistryTls: Int = 0,
171171
val kafkaUi: Int = 0,
172172
val kafkaUiTls: Int = 0,
173-
val localStackS3: Int = 0,
174-
val localStackS3Tls: Int = 0,
173+
val s3: Int = 0,
174+
val s3Tls: Int = 0,
175175
val fakeGcs: Int = 0,
176176
val fakeGcsTls: Int = 0,
177177
) {

core/src/main/kotlin/org/openprojectx/bigdata/test/core/config/BigDataTestConfig.kt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ data class BigDataTestConfig(
3030
val kafkaTls: BigDataTestHttpTlsConfig = BigDataTestHttpTlsConfig(),
3131
val schemaRegistryTls: BigDataTestHttpTlsConfig = BigDataTestHttpTlsConfig(),
3232
val kafkaUiTls: BigDataTestHttpTlsConfig = BigDataTestHttpTlsConfig(),
33-
val localStackS3Tls: BigDataTestHttpTlsConfig = BigDataTestHttpTlsConfig(),
33+
val s3Tls: BigDataTestHttpTlsConfig = BigDataTestHttpTlsConfig(),
3434
val fakeGcsTls: BigDataTestHttpTlsConfig = BigDataTestHttpTlsConfig(),
3535
val ports: BigDataTestPortConfig = BigDataTestPortConfig(),
3636
val containerLogs: BigDataTestContainerLogConfig = BigDataTestContainerLogConfig(),
@@ -53,7 +53,7 @@ data class BigDataTestConfig(
5353
kafkaTls = kafkaTls.merge(override.kafkaTls),
5454
schemaRegistryTls = schemaRegistryTls.merge(override.schemaRegistryTls),
5555
kafkaUiTls = kafkaUiTls.merge(override.kafkaUiTls),
56-
localStackS3Tls = localStackS3Tls.merge(override.localStackS3Tls),
56+
s3Tls = s3Tls.merge(override.s3Tls),
5757
fakeGcsTls = fakeGcsTls.merge(override.fakeGcsTls),
5858
ports = ports.merge(override.ports),
5959
containerLogs = containerLogs.merge(override.containerLogs),
@@ -212,7 +212,7 @@ data class BigDataTestImageConfig(
212212
val kafka: String? = null,
213213
val schemaRegistry: String? = null,
214214
val kafkaUi: String? = null,
215-
val localStackS3: String? = null,
215+
val s3: String? = null,
216216
val fakeGcs: String? = null,
217217
) {
218218
fun merge(override: BigDataTestImageConfig): BigDataTestImageConfig =
@@ -227,7 +227,7 @@ data class BigDataTestImageConfig(
227227
kafka = override.kafka ?: kafka,
228228
schemaRegistry = override.schemaRegistry ?: schemaRegistry,
229229
kafkaUi = override.kafkaUi ?: kafkaUi,
230-
localStackS3 = override.localStackS3 ?: localStackS3,
230+
s3 = override.s3 ?: s3,
231231
fakeGcs = override.fakeGcs ?: fakeGcs,
232232
)
233233
}
@@ -244,7 +244,7 @@ data class BigDataTestServiceConfig(
244244
val schemaRegistry: Boolean? = null,
245245
val kafkaUi: Boolean? = null,
246246
val kafkaUiKerberos: Boolean? = null,
247-
val localStackS3: Boolean? = null,
247+
val s3: Boolean? = null,
248248
val fakeGcs: Boolean? = null,
249249
) {
250250
fun merge(override: BigDataTestServiceConfig): BigDataTestServiceConfig =
@@ -260,7 +260,7 @@ data class BigDataTestServiceConfig(
260260
schemaRegistry = override.schemaRegistry ?: schemaRegistry,
261261
kafkaUi = override.kafkaUi ?: kafkaUi,
262262
kafkaUiKerberos = override.kafkaUiKerberos ?: kafkaUiKerberos,
263-
localStackS3 = override.localStackS3 ?: localStackS3,
263+
s3 = override.s3 ?: s3,
264264
fakeGcs = override.fakeGcs ?: fakeGcs,
265265
)
266266
}
@@ -278,8 +278,8 @@ data class BigDataTestPortConfig(
278278
val schemaRegistryTls: Int? = null,
279279
val kafkaUi: Int? = null,
280280
val kafkaUiTls: Int? = null,
281-
val localStackS3: Int? = null,
282-
val localStackS3Tls: Int? = null,
281+
val s3: Int? = null,
282+
val s3Tls: Int? = null,
283283
val fakeGcs: Int? = null,
284284
val fakeGcsTls: Int? = null,
285285
) {
@@ -297,8 +297,8 @@ data class BigDataTestPortConfig(
297297
schemaRegistryTls = override.schemaRegistryTls ?: schemaRegistryTls,
298298
kafkaUi = override.kafkaUi ?: kafkaUi,
299299
kafkaUiTls = override.kafkaUiTls ?: kafkaUiTls,
300-
localStackS3 = override.localStackS3 ?: localStackS3,
301-
localStackS3Tls = override.localStackS3Tls ?: localStackS3Tls,
300+
s3 = override.s3 ?: s3,
301+
s3Tls = override.s3Tls ?: s3Tls,
302302
fakeGcs = override.fakeGcs ?: fakeGcs,
303303
fakeGcsTls = override.fakeGcsTls ?: fakeGcsTls,
304304
)
@@ -340,7 +340,7 @@ class BigDataTestConfigLoader(
340340
val kafkaTls = tables["kafkaTls"].orEmpty()
341341
val schemaRegistryTls = tables["schemaRegistryTls"].orEmpty()
342342
val kafkaUiTls = tables["kafkaUiTls"].orEmpty()
343-
val localStackS3Tls = tables["localStackS3Tls"].orEmpty()
343+
val s3Tls = tables["s3Tls"].orEmpty()
344344
val fakeGcsTls = tables["fakeGcsTls"].orEmpty()
345345
val ports = tables["ports"].orEmpty()
346346
val containerLogs = tables["containerLogs"].orEmpty()
@@ -356,7 +356,7 @@ class BigDataTestConfigLoader(
356356
kafka = images.string("kafka"),
357357
schemaRegistry = images.string("schemaRegistry"),
358358
kafkaUi = images.string("kafkaUi"),
359-
localStackS3 = images.string("localStackS3"),
359+
s3 = images.string("s3"),
360360
fakeGcs = images.string("fakeGcs"),
361361
),
362362
services = BigDataTestServiceConfig(
@@ -371,7 +371,7 @@ class BigDataTestConfigLoader(
371371
schemaRegistry = services.boolean("schemaRegistry"),
372372
kafkaUi = services.boolean("kafkaUi"),
373373
kafkaUiKerberos = services.boolean("kafkaUiKerberos"),
374-
localStackS3 = services.boolean("localStackS3"),
374+
s3 = services.boolean("s3"),
375375
fakeGcs = services.boolean("fakeGcs"),
376376
),
377377
kerberos = BigDataTestKerberosConfig(
@@ -427,7 +427,7 @@ class BigDataTestConfigLoader(
427427
kafkaTls = httpTls(kafkaTls),
428428
schemaRegistryTls = httpTls(schemaRegistryTls),
429429
kafkaUiTls = httpTls(kafkaUiTls),
430-
localStackS3Tls = httpTls(localStackS3Tls),
430+
s3Tls = httpTls(s3Tls),
431431
fakeGcsTls = httpTls(fakeGcsTls),
432432
ports = BigDataTestPortConfig(
433433
sameHostPorts = ports.boolean("sameHostPorts"),
@@ -442,8 +442,8 @@ class BigDataTestConfigLoader(
442442
schemaRegistryTls = ports.int("schemaRegistryTls"),
443443
kafkaUi = ports.int("kafkaUi"),
444444
kafkaUiTls = ports.int("kafkaUiTls"),
445-
localStackS3 = ports.int("localStackS3"),
446-
localStackS3Tls = ports.int("localStackS3Tls"),
445+
s3 = ports.int("s3"),
446+
s3Tls = ports.int("s3Tls"),
447447
fakeGcs = ports.int("fakeGcs"),
448448
fakeGcsTls = ports.int("fakeGcsTls"),
449449
),
@@ -628,7 +628,7 @@ class BigDataTestConfigLoader(
628628
"kafka" to BigDataService.KAFKA,
629629
"schemaregistry" to BigDataService.SCHEMA_REGISTRY,
630630
"kafkaui" to BigDataService.KAFKA_UI,
631-
"localstacks3" to BigDataService.LOCALSTACK_S3,
631+
"s3" to BigDataService.S3,
632632
"fakegcs" to BigDataService.FAKE_GCS,
633633
)
634634
}

0 commit comments

Comments
 (0)