diff --git a/tool/tsh/common/kube_test.go b/tool/tsh/common/kube_test.go index ac19165591d30..c35d380fc830c 100644 --- a/tool/tsh/common/kube_test.go +++ b/tool/tsh/common/kube_test.go @@ -37,6 +37,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/uuid" "github.com/gravitational/trace" + "github.com/jonboulle/clockwork" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" @@ -365,6 +366,7 @@ func TestKubeSelection(t *testing.T) { cfg.Kube.ResourceMatchers = []services.ResourceMatcher{{ Labels: map[string]apiutils.Strings{"*": {"*"}}, }} + cfg.Clock = clockwork.NewFakeClock() }), ) kubeBarEKS := "bar-eks-us-west-1-123456789012" diff --git a/tool/tsh/common/tsh_test.go b/tool/tsh/common/tsh_test.go index d8f0f3dd1a3b0..7959fc6596a36 100644 --- a/tool/tsh/common/tsh_test.go +++ b/tool/tsh/common/tsh_test.go @@ -47,6 +47,7 @@ import ( "github.com/ghodss/yaml" "github.com/gravitational/trace" + "github.com/jonboulle/clockwork" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" otlp "go.opentelemetry.io/proto/otlp/trace/v1" @@ -1808,7 +1809,11 @@ func TestSSHAccessRequest(t *testing.T) { } alice.SetTraits(traits) - rootAuth, rootProxy := makeTestServers(t, withBootstrap(requester, nodeAccessRole, connector, alice)) + rootAuth, rootProxy := makeTestServers(t, + withBootstrap(requester, nodeAccessRole, connector, alice), + withConfig(func(cfg *servicecfg.Config) { + cfg.Clock = clockwork.NewFakeClock() + })) authAddr, err := rootAuth.AuthAddr() require.NoError(t, err)