summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs_test.go b/fs_test.go
index b6906fa..cb1d7ba 100644
--- a/fs_test.go
+++ b/fs_test.go
@@ -4,6 +4,7 @@ import (
"testing"
"github.com/matryer/is"
+ "github.com/spf13/afero"
)
func TestFsListBuckets(t *testing.T) {
@@ -40,6 +41,14 @@ func TestFsStat(t *testing.T) {
is.Equal(info.Name(), "file")
}
+func TestFsStatNoExist(t *testing.T) {
+ is := is.New(t)
+ fs, err := newTestFs()
+ is.NoErr(err)
+ _, err = fs.Stat("dir/non-existent")
+ is.Equal(err, afero.ErrFileNotFound)
+}
+
func newTestFs() (*Fs, error) {
fs, err := NewFs("127.0.0.1:9000", "test-bucket", "testuser", "testsecret", false)
return fs, err