diff --git a/examples/postgresql/postgresql.feature b/examples/postgresql/postgresql.feature index b2b96aca..3561940a 100644 --- a/examples/postgresql/postgresql.feature +++ b/examples/postgresql/postgresql.feature @@ -14,7 +14,7 @@ Feature: PostgreSQL Scenario: Connect and insert Given Database connection | driver | ${YAKS_TESTCONTAINERS_POSTGRESQL_DRIVER} | - | url | ${YAKS_TESTCONTAINERS_POSTGRESQL_URL} | + | url | ${YAKS_TESTCONTAINERS_POSTGRESQL_LOCAL_URL} | | username | ${YAKS_TESTCONTAINERS_POSTGRESQL_USERNAME} | | password | ${YAKS_TESTCONTAINERS_POSTGRESQL_PASSWORD} | When execute SQL update: INSERT INTO todo VALUES (1, 'Write YAKS test', 0) diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSteps.java index 85c0a30f..c54c625a 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSteps.java @@ -83,6 +83,7 @@ public void setEnvSettings(DataTable settings) { public void startKafka() { kafkaContainer = new KafkaContainer(DockerImageName.parse(KafkaSettings.getImageName()).withTag(kafkaVersion)) .withLabel("app", "yaks") + .withLabel("com.joyrex2001.kubedock.name-prefix", "yaks-kafka") .withLabel("app.kubernetes.io/name", "kafka") .withLabel("app.kubernetes.io/part-of", TestContainersSettings.getTestName()) .withLabel("app.openshift.io/connects-to", TestContainersSettings.getTestId()) @@ -122,11 +123,16 @@ private void setConnectionSettings(KafkaContainer kafkaContainer, TestContext co } String containerId = kafkaContainer.getContainerId().substring(0, 12); + String containerName = kafkaContainer.getContainerName(); + + if (containerName.startsWith("/")) { + containerName = containerName.substring(1); + } context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_HOST", kafkaContainer.getHost()); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_CONTAINER_IP", kafkaContainer.getHost()); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_CONTAINER_ID", containerId); - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_CONTAINER_NAME", kafkaContainer.getContainerName()); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_CONTAINER_NAME", containerName); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_SERVICE_PORT", String.valueOf(kafkaContainer.getMappedPort(KafkaContainer.KAFKA_PORT))); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_PORT", String.valueOf(kafkaContainer.getMappedPort(KafkaContainer.KAFKA_PORT))); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_LOCAL_BOOTSTRAP_SERVERS", kafkaContainer.getBootstrapServers()); @@ -135,10 +141,10 @@ private void setConnectionSettings(KafkaContainer kafkaContainer, TestContext co context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_SERVICE_NAME", "kafka"); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_BOOTSTRAP_SERVERS", kafkaContainer.getBootstrapServers()); } else { - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_SERVICE_NAME", String.format("kd-%s", containerId)); - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_BOOTSTRAP_SERVERS", String.format("kd-%s:%s", containerId, kafkaContainer.getMappedPort(KafkaContainer.KAFKA_PORT))); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_SERVICE_NAME", String.format("yaks-kafka-%s", containerId)); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_BOOTSTRAP_SERVERS", String.format("yaks-kafka-%s:%s", containerId, kafkaContainer.getMappedPort(KafkaContainer.KAFKA_PORT))); } - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_KUBE_DOCK_HOST", String.format("kd-%s", containerId)); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "KAFKA_KUBE_DOCK_HOST", String.format("yaks-kafka-%s", containerId)); } } diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSteps.java index 2631467e..5d1cd91f 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSteps.java @@ -99,6 +99,7 @@ public void startLocalStack() { aws2Container = new AWS2Container(localStackVersion) .withServices(services.toArray(AWS2Container.AWS2Service[]::new)) .withLabel("app", "yaks") + .withLabel("com.joyrex2001.kubedock.name-prefix", "yaks-aws2") .withLabel("app.kubernetes.io/name", "build") .withLabel("app.kubernetes.io/part-of", TestContainersSettings.getTestName()) .withLabel("app.openshift.io/connects-to", TestContainersSettings.getTestId()) @@ -137,11 +138,16 @@ private void exposeConnectionSettings(AWS2Container aws2Container, TestContext c URI serviceEndpoint = aws2Container.getServiceEndpoint(); String containerId = aws2Container.getContainerId().substring(0, 12); + String containerName = aws2Container.getContainerName(); + + if (containerName.startsWith("/")) { + containerName = containerName.substring(1); + } context.setVariable(getEnvVarName("HOST"), aws2Container.getHost()); context.setVariable(getEnvVarName("CONTAINER_IP"), aws2Container.getHost()); context.setVariable(getEnvVarName("CONTAINER_ID"), containerId); - context.setVariable(getEnvVarName("CONTAINER_NAME"), aws2Container.getContainerName()); + context.setVariable(getEnvVarName("CONTAINER_NAME"), containerName); context.setVariable(getEnvVarName("REGION"), aws2Container.getRegion()); context.setVariable(getEnvVarName("ACCESS_KEY"), aws2Container.getAccessKey()); context.setVariable(getEnvVarName("SECRET_KEY"), aws2Container.getSecretKey()); @@ -152,8 +158,8 @@ private void exposeConnectionSettings(AWS2Container aws2Container, TestContext c context.setVariable(getEnvVarName("SERVICE_NAME"), "localstack"); context.setVariable(getEnvVarName("SERVICE_URL"), String.format("http://%s:%s", aws2Container.getHostIpAddress(), serviceEndpoint.getPort())); } else { - context.setVariable(getEnvVarName("SERVICE_NAME"), String.format("kd-%s", containerId)); - context.setVariable(getEnvVarName("SERVICE_URL"), String.format("http://kd-%s:%s", containerId, serviceEndpoint.getPort())); + context.setVariable(getEnvVarName("SERVICE_NAME"), String.format("yaks-aws2-%s", containerId)); + context.setVariable(getEnvVarName("SERVICE_URL"), String.format("http://yaks-aws2-%s:%s", containerId, serviceEndpoint.getPort())); } services.forEach(service -> { @@ -163,27 +169,26 @@ private void exposeConnectionSettings(AWS2Container aws2Container, TestContext c context.setVariable(getEnvVarName(String.format("%s_URL", serviceName)), String.format("http://%s:%s", aws2Container.getHostIpAddress(), serviceEndpoint.getPort())); } else if (service == AWS2Container.AWS2Service.S3) { // Explicitly use cluster IP address in order to enable path-style access on S3 service - Optional clusterIp = KubernetesSupport.getServiceClusterIp(citrus, String.format("kd-%s", containerId), getNamespace(context)); + Optional clusterIp = KubernetesSupport.getServiceClusterIp(citrus, String.format("yaks-aws2-%s", containerId), getNamespace(context)); if (clusterIp.isPresent()) { context.setVariable(getEnvVarName(String.format("%s_URL", serviceName)), String.format("http://%s:%s", clusterIp.get(), serviceEndpoint.getPort())); } else { - context.setVariable(getEnvVarName(String.format("%s_URL", serviceName)), String.format("http://kd-%s:%s", containerId, serviceEndpoint.getPort())); + context.setVariable(getEnvVarName(String.format("%s_URL", serviceName)), String.format("http://yaks-aws2-%s:%s", containerId, serviceEndpoint.getPort())); } } else { - context.setVariable(getEnvVarName(String.format("%s_URL", serviceName)), String.format("http://kd-%s:%s", containerId, serviceEndpoint.getPort())); + context.setVariable(getEnvVarName(String.format("%s_URL", serviceName)), String.format("http://yaks-aws2-%s:%s", containerId, serviceEndpoint.getPort())); } context.setVariable(getEnvVarName(String.format("%s_LOCAL_URL", serviceName)), String.format("http://localhost:%s", serviceEndpoint.getPort())); context.setVariable(getEnvVarName(String.format("%s_PORT", serviceName)), serviceEndpoint.getPort()); }); - context.setVariable(getEnvVarName("KUBE_DOCK_SERVICE_URL"), String.format("http://kd-%s:%s", containerId, serviceEndpoint.getPort())); - context.setVariable(getEnvVarName("KUBE_DOCK_HOST"), String.format("kd-%s", containerId)); + context.setVariable(getEnvVarName("KUBE_DOCK_SERVICE_URL"), String.format("http://yaks-aws2-%s:%s", containerId, serviceEndpoint.getPort())); + context.setVariable(getEnvVarName("KUBE_DOCK_HOST"), String.format("yaks-aws2-%s", containerId)); for (Map.Entry connectionProperty : aws2Container.getConnectionProperties().entrySet()) { context.setVariable(connectionProperty.getKey().toString(), connectionProperty.getValue().toString()); } - } } diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/MongoDBSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/MongoDBSteps.java index 2e65425c..bc0eff94 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/MongoDBSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/MongoDBSteps.java @@ -83,6 +83,7 @@ public void setEnvSettings(DataTable settings) { public void startMongo() { mongoDBContainer = new MongoDBContainer(DockerImageName.parse("mongo").withTag(mongoDBVersion)) .withLabel("app", "yaks") + .withLabel("com.joyrex2001.kubedock.name-prefix", "yaks-mongodb") .withLabel("app.kubernetes.io/name", "mongodb") .withLabel("app.kubernetes.io/part-of", TestContainersSettings.getTestName()) .withLabel("app.openshift.io/connects-to", TestContainersSettings.getTestId()) @@ -120,10 +121,15 @@ public void stopMongo() { private void setConnectionSettings(MongoDBContainer mongoDBContainer, TestContext context) { if (mongoDBContainer.isRunning()) { String containerId = mongoDBContainer.getContainerId().substring(0, 12); + String containerName = mongoDBContainer.getContainerName(); + + if (containerName.startsWith("/")) { + containerName = containerName.substring(1); + } context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_CONTAINER_IP", mongoDBContainer.getHost()); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_CONTAINER_ID", containerId); - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_CONTAINER_NAME", mongoDBContainer.getContainerName()); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_CONTAINER_NAME", containerName); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_SERVICE_PORT", mongoDBContainer.getMappedPort(27017)); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_SERVICE_LOCAL_URL", mongoDBContainer.getReplicaSetUrl()); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_LOCAL_URL", mongoDBContainer.getReplicaSetUrl()); @@ -133,13 +139,13 @@ private void setConnectionSettings(MongoDBContainer mongoDBContainer, TestContex context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_SERVICE_URL", mongoDBContainer.getReplicaSetUrl()); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_URL", mongoDBContainer.getReplicaSetUrl()); } else { - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_SERVICE_NAME", String.format("kd-%s", containerId)); - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_SERVICE_URL", String.format("mongodb://kd-%s:%d/test", containerId, mongoDBContainer.getMappedPort(27017))); - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_URL", String.format("mongodb://kd-%s:%d/test", containerId, mongoDBContainer.getMappedPort(27017))); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_SERVICE_NAME", String.format("yaks-mongodb-%s", containerId)); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_SERVICE_URL", String.format("mongodb://yaks-mongodb-%s:%d/test", containerId, mongoDBContainer.getMappedPort(27017))); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_URL", String.format("mongodb://yaks-mongodb-%s:%d/test", containerId, mongoDBContainer.getMappedPort(27017))); } - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_KUBE_DOCK_HOST", String.format("kd-%s", containerId)); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "MONGODB_KUBE_DOCK_HOST", String.format("yaks-mongodb-%s", containerId)); } } } diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/PostgreSQLSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/PostgreSQLSteps.java index 69404114..46a3b154 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/PostgreSQLSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/PostgreSQLSteps.java @@ -113,6 +113,7 @@ public void startPostgresql() { .withPassword(password) .withDatabaseName(databaseName) .withLabel("app", "yaks") + .withLabel("com.joyrex2001.kubedock.name-prefix", "yaks-postgresql") .withLabel("app.kubernetes.io/name", "postgresql") .withLabel("app.kubernetes.io/part-of", TestContainersSettings.getTestName()) .withLabel("app.openshift.io/connects-to", TestContainersSettings.getTestId()) @@ -169,11 +170,16 @@ private void setConnectionSettings(PostgreSQLContainer postgreSQLContainer, T } String containerId = postgreSQLContainer.getContainerId().substring(0, 12); + String containerName = postgreSQLContainer.getContainerName(); + + if (containerName.startsWith("/")) { + containerName = containerName.substring(1); + } context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_HOST", postgreSQLContainer.getHost()); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_CONTAINER_IP", postgreSQLContainer.getHost()); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_CONTAINER_ID", containerId); - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_CONTAINER_NAME", postgreSQLContainer.getContainerName()); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_CONTAINER_NAME", containerName); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_SERVICE_PORT", String.valueOf(postgreSQLContainer.getMappedPort(PostgreSQLContainer.POSTGRESQL_PORT))); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_PORT", String.valueOf(postgreSQLContainer.getMappedPort(PostgreSQLContainer.POSTGRESQL_PORT))); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_USERNAME", postgreSQLContainer.getUsername()); @@ -188,11 +194,11 @@ private void setConnectionSettings(PostgreSQLContainer postgreSQLContainer, T context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_SERVICE_URL", postgreSQLContainer.getJdbcUrl()); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_URL", postgreSQLContainer.getJdbcUrl()); } else { - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_SERVICE_NAME", String.format("kd-%s", containerId)); - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_SERVICE_URL", String.format("jdbc:postgresql://kd-%s:%s/%s", containerId, postgreSQLContainer.getMappedPort(PostgreSQLContainer.POSTGRESQL_PORT), postgreSQLContainer.getDatabaseName())); - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_URL", String.format("jdbc:postgresql://kd-%s:%s/%s", containerId, postgreSQLContainer.getMappedPort(PostgreSQLContainer.POSTGRESQL_PORT), postgreSQLContainer.getDatabaseName())); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_SERVICE_NAME", String.format("yaks-postgresql-%s", containerId)); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_SERVICE_URL", String.format("jdbc:postgresql://yaks-postgresql-%s:%s/%s", containerId, postgreSQLContainer.getMappedPort(PostgreSQLContainer.POSTGRESQL_PORT), postgreSQLContainer.getDatabaseName())); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_URL", String.format("jdbc:postgresql://yaks-postgresql-%s:%s/%s", containerId, postgreSQLContainer.getMappedPort(PostgreSQLContainer.POSTGRESQL_PORT), postgreSQLContainer.getDatabaseName())); } - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_KUBE_DOCK_HOST", String.format("kd-%s", containerId)); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "POSTGRESQL_KUBE_DOCK_HOST", String.format("yaks-postgresql-%s", containerId)); } } diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSteps.java index d91684e1..4f68c7d7 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSteps.java @@ -86,6 +86,7 @@ public void setEnvSettings(DataTable settings) { public void startRedpanda() { redpandaContainer = new RedpandaContainer(DockerImageName.parse(RedpandaSettings.getImageName()).withTag(redpandaVersion)) .withLabel("app", "yaks") + .withLabel("com.joyrex2001.kubedock.name-prefix", "yaks-redpanda") .withLabel("app.kubernetes.io/name", "redpanda") .withLabel("app.kubernetes.io/part-of", TestContainersSettings.getTestName()) .withLabel("app.openshift.io/connects-to", TestContainersSettings.getTestId()) @@ -126,11 +127,16 @@ private void setConnectionSettings(RedpandaContainer redpandaContainer, TestCont } String containerId = redpandaContainer.getContainerId().substring(0, 12); + String containerName = redpandaContainer.getContainerName(); + + if (containerName.startsWith("/")) { + containerName = containerName.substring(1); + } context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_HOST", redpandaContainer.getHost()); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_CONTAINER_IP", redpandaContainer.getHost()); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_CONTAINER_ID", containerId); - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_CONTAINER_NAME", redpandaContainer.getContainerName()); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_CONTAINER_NAME", containerName); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_SERVICE_PORT", String.valueOf(redpandaContainer.getMappedPort(REDPANDA_PORT))); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_PORT", String.valueOf(redpandaContainer.getMappedPort(REDPANDA_PORT))); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_LOCAL_BOOTSTRAP_SERVERS", redpandaContainer.getBootstrapServers()); @@ -139,10 +145,10 @@ private void setConnectionSettings(RedpandaContainer redpandaContainer, TestCont context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_SERVICE_NAME", "redpanda"); context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_BOOTSTRAP_SERVERS", redpandaContainer.getBootstrapServers()); } else { - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_SERVICE_NAME", String.format("kd-%s", containerId)); - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_BOOTSTRAP_SERVERS", String.format("kd-%s:%s", containerId, redpandaContainer.getMappedPort(REDPANDA_PORT))); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_SERVICE_NAME", String.format("yaks-redpanda-%s", containerId)); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_BOOTSTRAP_SERVERS", String.format("yaks-redpanda-%s:%s", containerId, redpandaContainer.getMappedPort(REDPANDA_PORT))); } - context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_KUBE_DOCK_HOST", String.format("kd-%s", containerId)); + context.setVariable(TestContainersSteps.TESTCONTAINERS_VARIABLE_PREFIX + "REDPANDA_KUBE_DOCK_HOST", String.format("yaks-redpanda-%s", containerId)); } } diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go index 5447f99d..10921ce1 100644 --- a/pkg/cmd/run.go +++ b/pkg/cmd/run.go @@ -56,7 +56,7 @@ import ( const ( ConfigFile = "yaks-config.yaml" SettingsFile = "yaks.settings.yaml" - KubeDockImage = "joyrex2001/kubedock:0.12.0" + KubeDockImage = "joyrex2001/kubedock:0.14.0" SeleniumImage = "selenium/standalone-chrome:latest" )