feat: expose logs method on container interface (#17526)
This commit is contained in:
parent
1fc4bea448
commit
67be774707
|
@ -5,6 +5,7 @@ package cluster
|
|||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/testcontainers/testcontainers-go"
|
||||
|
||||
|
@ -22,6 +23,7 @@ type Agent interface {
|
|||
GetAgentName() string
|
||||
GetPartition() string
|
||||
GetPod() testcontainers.Container
|
||||
Logs(context.Context) (io.ReadCloser, error)
|
||||
ClaimAdminPort() (int, error)
|
||||
GetConfig() Config
|
||||
GetInfo() AgentInfo
|
||||
|
|
|
@ -68,6 +68,10 @@ func (c *consulContainerNode) GetPod() testcontainers.Container {
|
|||
return c.pod
|
||||
}
|
||||
|
||||
func (c *consulContainerNode) Logs(context context.Context) (io.ReadCloser, error) {
|
||||
return c.container.Logs(context)
|
||||
}
|
||||
|
||||
func (c *consulContainerNode) ClaimAdminPort() (int, error) {
|
||||
if c.nextAdminPortOffset >= MaxEnvoyOnNode {
|
||||
return 0, fmt.Errorf("running out of envoy admin port, max %d, already claimed %d",
|
||||
|
|
Loading…
Reference in New Issue