From ef479fbef9998f55d961a2b358b18b23168993e1 Mon Sep 17 00:00:00 2001 From: Marco Dinis Date: Thu, 31 Mar 2022 15:07:32 +0100 Subject: [PATCH] check for err on file.Write --- 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 2357061695c75..4d8e8f56e243f 100644 --- a/tool/tsh/tshconfig_test.go +++ b/tool/tsh/tshconfig_test.go @@ -36,7 +36,8 @@ func TestLoadConfigEmptyFile(t *testing.T) { require.NoError(t, err) defer os.Remove(file.Name()) - file.Write([]byte(" ")) + _, err = file.Write([]byte(" ")) + require.NoError(t, err) gotConfig, gotErr := loadConfig(file.Name()) require.NoError(t, gotErr)