MCPcopy
hub / github.com/wal-g/wal-g / TestCompressAndEncryptError

Function TestCompressAndEncryptError

internal/compression_structures_test.go:162–171  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

160}
161
162func 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
173func TestCompressAndEncryptWithNoCompression(t *testing.T) {
174 for _, testCase := range tests {

Callers

nothing calls this directly

Calls 3

CompressAndEncryptFunction · 0.92
GetLz4CompressorFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected