From c1512e67d1f52f6ebe1bdbd34e0ddb04e966b974 Mon Sep 17 00:00:00 2001 From: Matthew Rich Date: Fri, 4 Oct 2024 00:11:58 +0000 Subject: [PATCH] check write error --- internal/transport/file_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/transport/file_test.go b/internal/transport/file_test.go index 915ffb0..e35c999 100644 --- a/internal/transport/file_test.go +++ b/internal/transport/file_test.go @@ -57,7 +57,9 @@ func TestTransportFileGzipWriter(t *testing.T) { assert.True(t, fw.Gzip()) writer := fw.Writer() - writer.Write([]byte(testValue)) + n, err := writer.Write([]byte(testValue)) + assert.Equal(t, len(testValue), n) + assert.Nil(t, err) assert.Nil(t, writer.Close()) assert.True(t, TempDir.FileExists("foo.tgz"))