(t *testing.T)
| 160 | } |
| 161 | |
| 162 | func TestCompressAndEncryptError(t *testing.T) { |
| 163 | compressor := GetLz4Compressor() |
| 164 | compressed := internal.CompressAndEncrypt(&testtools.ErrorReader{}, compressor, nil) |
| 165 | |
| 166 | _, err := io.ReadAll(compressed) |
| 167 | assert.Errorf(t, err, "compress: CompressingPipeWriter expected error but got `<nil>`") |
| 168 | if re, ok := err.(internal.CompressAndEncryptError); !ok { |
| 169 | t.Errorf("compress: CompressingPipeWriter expected CompressAndEncryptError but got %v", re) |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | func TestCompressAndEncryptWithNoCompression(t *testing.T) { |
| 174 | for _, testCase := range tests { |
nothing calls this directly
no test coverage detected