Browse Source

test(device-connectivity): pass DockerComposeParams to gateway compose renderer

Update DeviceConnectivityUtilTest to match the new
getGatewayDockerComposeFile signature: build a DockerComposeParams
(true, "tb-gateway", true, true, true, true) and pass it alongside
the host, image tag, and credentials.
pull/15801/head
Igor Kulikov 4 months ago
parent
commit
c6c0b328a7
  1. 4
      dao/src/test/java/org/thingsboard/server/dao/util/DeviceConnectivityUtilTest.java

4
dao/src/test/java/org/thingsboard/server/dao/util/DeviceConnectivityUtilTest.java

@ -20,6 +20,7 @@ import org.thingsboard.common.util.JacksonUtil;
import org.thingsboard.server.common.data.device.credentials.BasicMqttCredentials;
import org.thingsboard.server.common.data.security.DeviceCredentials;
import org.thingsboard.server.common.data.security.DeviceCredentialsType;
import org.thingsboard.server.dao.device.DockerComposeParams;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@ -115,8 +116,9 @@ class DeviceConnectivityUtilTest {
}
private static String renderCompose(DeviceCredentials credentials) throws Exception {
DockerComposeParams params = new DockerComposeParams(true, "tb-gateway", true, true, true, true);
var resource = DeviceConnectivityUtil.getGatewayDockerComposeFile(
"host.docker.internal", "3.8-stable", credentials);
"host.docker.internal", "3.8-stable", credentials, params);
try (var in = resource.getInputStream()) {
return new String(in.readAllBytes(), StandardCharsets.UTF_8);
}

Loading…
Cancel
Save