Skip to content

Commit

Permalink
feat: expose logs method on container interface
Browse files Browse the repository at this point in the history
  • Loading branch information
JadhavPoonam committed May 31, 2023
1 parent a065eef commit 65d5aea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/integration/consul-container/libs/cluster/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package cluster

import (
"context"
"io"

"github.com/testcontainers/testcontainers-go"

Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions test/integration/consul-container/libs/cluster/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 65d5aea

Please sign in to comment.