diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-07-30 15:37:03 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-07-30 15:37:03 +0200 |
commit | 4ddd5361c1ee9b8abbd1f1cb60395d0979127f03 (patch) | |
tree | 2ceafdbf7d459b7f12bafcbc69e401f7e454116f /source/lazy_file_reader_test.go | |
parent | a0859dc67284988a397e265f7e83ea07357e9eb8 (diff) |
Use the Afero source fs where relevant
Fixes #2319
Diffstat (limited to 'source/lazy_file_reader_test.go')
-rw-r--r-- | source/lazy_file_reader_test.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/lazy_file_reader_test.go b/source/lazy_file_reader_test.go index 5522c9f1b..778a9513b 100644 --- a/source/lazy_file_reader_test.go +++ b/source/lazy_file_reader_test.go @@ -16,7 +16,6 @@ package source import ( "bytes" "io" - "io/ioutil" "os" "testing" @@ -60,7 +59,7 @@ func TestRead(t *testing.T) { b, err := afero.ReadFile(fs, filename) if err != nil { - t.Fatalf("ioutil.ReadFile: %v", err) + t.Fatalf("afero.ReadFile: %v", err) } rd, err := NewLazyFileReader(fs, filename) @@ -101,7 +100,7 @@ func TestSeek(t *testing.T) { filename := "lazy_file_reader_test.go" b, err := afero.ReadFile(fs, filename) if err != nil { - t.Fatalf("ioutil.ReadFile: %v", err) + t.Fatalf("afero.ReadFile: %v", err) } // no cache case @@ -192,14 +191,14 @@ func TestSeek(t *testing.T) { func TestWriteTo(t *testing.T) { fs := afero.NewOsFs() filename := "lazy_file_reader_test.go" - fi, err := os.Stat(filename) + fi, err := fs.Stat(filename) if err != nil { t.Fatalf("os.Stat: %v", err) } - b, err := ioutil.ReadFile(filename) + b, err := afero.ReadFile(fs, filename) if err != nil { - t.Fatalf("ioutil.ReadFile: %v", err) + t.Fatalf("afero.ReadFile: %v", err) } rd, err := NewLazyFileReader(fs, filename) |