Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

289 B
Raw Blame
package readers

import (
	"errors"
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestErrorReader(t *testing.T) {
	errRead := errors.New("boom")
	r := ErrorReader{errRead}

	buf := make([]byte, 16)
	n, err := r.Read(buf)
	assert.Equal(t, errRead, err)
	assert.Equal(t, 0, n)
}