diff --git a/libraries/shared/fetcher/storage_fetcher.go b/libraries/shared/fetcher/storage_fetcher.go index 2115277b..e146a4ec 100644 --- a/libraries/shared/fetcher/storage_fetcher.go +++ b/libraries/shared/fetcher/storage_fetcher.go @@ -27,7 +27,8 @@ func (storageFetcher CsvTailStorageFetcher) FetchStorageDiffs(out chan<- utils.S row, parseErr := utils.FromStrings(strings.Split(line.Text, ",")) if parseErr != nil { errs <- parseErr + } else { + out <- row } - out <- row } } diff --git a/libraries/shared/fetcher/storage_fetcher_test.go b/libraries/shared/fetcher/storage_fetcher_test.go index f5d39dcd..b97fc55b 100644 --- a/libraries/shared/fetcher/storage_fetcher_test.go +++ b/libraries/shared/fetcher/storage_fetcher_test.go @@ -58,6 +58,12 @@ var _ = Describe("Csv Tail Storage Fetcher", func() { mockTailer.Lines <- line Expect(<-errorsChannel).To(HaveOccurred()) + select { + case <-rowsChannel: + Fail("value passed to rows channel on error") + default: + Succeed() + } close(done) }) })