From 48f1040c4adf00104e6548a37ded0ad1296a6a62 Mon Sep 17 00:00:00 2001 From: Marco Dinis Date: Thu, 31 Mar 2022 08:55:35 +0100 Subject: [PATCH] fix tsh config test --- tool/tsh/tshconfig_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tool/tsh/tshconfig_test.go b/tool/tsh/tshconfig_test.go index b3d11c90e8903..2357061695c75 100644 --- a/tool/tsh/tshconfig_test.go +++ b/tool/tsh/tshconfig_test.go @@ -33,10 +33,11 @@ func TestLoadConfigNonExistingFile(t *testing.T) { func TestLoadConfigEmptyFile(t *testing.T) { file, err := os.CreateTemp("", "test-telelport") - file.Write([]byte(" ")) require.NoError(t, err) defer os.Remove(file.Name()) + file.Write([]byte(" ")) + gotConfig, gotErr := loadConfig(file.Name()) require.NoError(t, gotErr) require.Equal(t, &TshConfig{}, gotConfig)