mirror of https://github.com/hashicorp/consul
backport of commit 65d5aeaaac
(#17531)
Co-authored-by: Poonam Jadhav <poonam.jadhav@hashicorp.com>pull/17532/head^2
parent
fe5a963c62
commit
d991db50fa
|
@ -2,6 +2,7 @@ package cluster
|
|||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/testcontainers/testcontainers-go"
|
||||
|
||||
|
@ -19,6 +20,7 @@ type Agent interface {
|
|||
GetAgentName() string
|
||||
GetPartition() string
|
||||
GetPod() testcontainers.Container
|
||||
Logs(context.Context) (io.ReadCloser, error)
|
||||
ClaimAdminPort() (int, error)
|
||||
GetConfig() Config
|
||||
GetInfo() AgentInfo
|
||||
|
|
|
@ -64,6 +64,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