github.com/yandex/pandora@v0.5.32/core/datasource/file_test.go (about) 1 package datasource 2 3 import ( 4 "os" 5 "testing" 6 7 "github.com/spf13/afero" 8 "github.com/yandex/pandora/core/coretest" 9 ) 10 11 func TestFileSource(t *testing.T) { 12 const filename = "/xxx/yyy" 13 fs := afero.NewMemMapFs() 14 source := NewFile(fs, FileConfig{Path: filename}) 15 coretest.AssertSourceEqualFile(t, fs, filename, source) 16 } 17 18 func TestStdin(t *testing.T) { 19 coretest.AssertSourceEqualStdStream(t, &os.Stdout, NewStdin) 20 }