fix: include API key in pod scaffolding

This commit is contained in:
jade
2026-08-18 10:54:47 +09:00
parent 0ba76e2618
commit 2852253a6b
2 changed files with 5 additions and 0 deletions

View File

@@ -143,6 +143,7 @@ public class PodScaffolder {
bundle-id: %s
name-prefix: ""
security:
api-key: ${TOOL_SERVER_API_KEY:tool-server-key}
tenant-domains:
TESTER-DEV: ALL
""".formatted(portStr, moduleName, moduleName.replace("dap-", ""));
@@ -339,6 +340,7 @@ public class PodScaffolder {
- "%s:%s"
environment:
- TZ=Asia/Seoul
- TOOL_SERVER_API_KEY=${TOOL_SERVER_API_KEY:-tool-server-key}
- AXHUB_GATEWAY_URL=http://gateway:8081
- AXHUB_TOOL_URL=http://%s:%s
- GLOW_COMMUNICATION_MCI_HOST=http://mci-mock

View File

@@ -30,11 +30,13 @@ class PodScaffolderTest {
Path resources = root.resolve("dap-was-sample/src/main/resources");
String dockerfile = Files.readString(root.resolve("dap-was-sample/Dockerfile"));
String application = Files.readString(resources.resolve("application.yml"));
assertTrue(dockerfile.contains("RUN apk add --no-cache tzdata"));
assertTrue(dockerfile.contains("ENV TZ=Asia/Seoul"));
assertTrue(dockerfile.contains("COPY dap-was-sample/build/libs/*-SNAPSHOT.jar app.jar"));
assertTrue(dockerfile.contains("EXPOSE 8099"));
assertTrue(application.contains("api-key: ${TOOL_SERVER_API_KEY:tool-server-key}"));
assertTrue(Files.exists(resources.resolve("application-test.yml")));
assertTrue(Files.exists(resources.resolve("application-prod.yml")));
assertTrue(Files.readString(resources.resolve("application-test.yml"))
@@ -60,6 +62,7 @@ class PodScaffolderTest {
String compose = Files.readString(root.resolve("docker-compose.yml"));
assertTrue(compose.contains("was-pro:"));
assertTrue(compose.contains("TOOL_SERVER_API_KEY=${TOOL_SERVER_API_KEY:-tool-server-key}"));
assertFalse(compose.contains("depends_on:\n - redis"));
assertFalse(compose.contains("SPRING_REDIS_HOST=redis"));
}