From 9fa740af6c232fcbd716889736b45a0039b5542d Mon Sep 17 00:00:00 2001 From: rosstimothy <39066650+rosstimothy@users.noreply.github.com> Date: Tue, 19 Mar 2024 19:16:38 -0400 Subject: [PATCH] Make TestProxySSHJumpHost less flaky (#39598) Disables disk-based session recording mode for all subtests to prevent writing to disk after the test concludes. ``` testing.go:1225: TempDir RemoveAll cleanup: unlinkat /tmp/TestProxySSHJumpHostTLS_routing_enabled_for_root_and_disabled_for_leaf132326872/002: directory not empty ``` Fixes #39578 --- tool/tsh/common/proxy_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tool/tsh/common/proxy_test.go b/tool/tsh/common/proxy_test.go index 2492f02f329f1..e66e9a7a9e873 100644 --- a/tool/tsh/common/proxy_test.go +++ b/tool/tsh/common/proxy_test.go @@ -572,9 +572,11 @@ func TestProxySSHJumpHost(t *testing.T) { opts: []testSuiteOptionFunc{ withRootConfigFunc(func(cfg *servicecfg.Config) { cfg.Auth.NetworkingConfig.SetProxyListenerMode(types.ProxyListenerMode_Multiplex) + cfg.Auth.SessionRecordingConfig.SetMode(types.RecordOff) }), withLeafConfigFunc(func(cfg *servicecfg.Config) { cfg.Auth.NetworkingConfig.SetProxyListenerMode(types.ProxyListenerMode_Multiplex) + cfg.Auth.SessionRecordingConfig.SetMode(types.RecordOff) }), }, }, @@ -583,9 +585,11 @@ func TestProxySSHJumpHost(t *testing.T) { opts: []testSuiteOptionFunc{ withRootConfigFunc(func(cfg *servicecfg.Config) { cfg.Auth.NetworkingConfig.SetProxyListenerMode(types.ProxyListenerMode_Multiplex) + cfg.Auth.SessionRecordingConfig.SetMode(types.RecordOff) }), withLeafConfigFunc(func(cfg *servicecfg.Config) { cfg.Auth.NetworkingConfig.SetProxyListenerMode(types.ProxyListenerMode_Separate) + cfg.Auth.SessionRecordingConfig.SetMode(types.RecordOff) }), }, }, @@ -594,9 +598,11 @@ func TestProxySSHJumpHost(t *testing.T) { opts: []testSuiteOptionFunc{ withRootConfigFunc(func(cfg *servicecfg.Config) { cfg.Auth.NetworkingConfig.SetProxyListenerMode(types.ProxyListenerMode_Separate) + cfg.Auth.SessionRecordingConfig.SetMode(types.RecordOff) }), withLeafConfigFunc(func(cfg *servicecfg.Config) { cfg.Auth.NetworkingConfig.SetProxyListenerMode(types.ProxyListenerMode_Multiplex) + cfg.Auth.SessionRecordingConfig.SetMode(types.RecordOff) }), }, }, @@ -605,9 +611,11 @@ func TestProxySSHJumpHost(t *testing.T) { opts: []testSuiteOptionFunc{ withRootConfigFunc(func(cfg *servicecfg.Config) { cfg.Auth.NetworkingConfig.SetProxyListenerMode(types.ProxyListenerMode_Separate) + cfg.Auth.SessionRecordingConfig.SetMode(types.RecordOff) }), withLeafConfigFunc(func(cfg *servicecfg.Config) { cfg.Auth.NetworkingConfig.SetProxyListenerMode(types.ProxyListenerMode_Separate) + cfg.Auth.SessionRecordingConfig.SetMode(types.RecordOff) }), }, },