Skip to content

Commit 566f51d

Browse files
authored
chore: Access to host and port from the Scala TestKit (#2314)
1 parent 5ac7d4f commit 566f51d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

sdk/scala-sdk-protobuf-testkit/src/main/scala/kalix/scalasdk/testkit/KalixTestKit.scala

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,23 @@ class KalixTestKit private (delegate: JTestKit) {
142142
def getGrpcClientForPrincipal[T](clientClass: Class[T], principal: Principal): T =
143143
delegate.getGrpcClientForPrincipal(clientClass, Principal.toJava(principal))
144144

145+
/**
146+
* Get the host name/IP address where the Kalix service is available. This is relevant in certain Continuous
147+
* Integration environments.
148+
*
149+
* @return
150+
* Kalix host
151+
*/
152+
def getHost: String = delegate.getHost
153+
154+
/**
155+
* Get the local port where the Kalix service is available.
156+
*
157+
* @return
158+
* local Kalix port
159+
*/
160+
def getPort: Int = delegate.getPort
161+
145162
/**
146163
* Get incoming messages for ValueEntity.
147164
*

0 commit comments

Comments
 (0)