Skip to content

Commit

Permalink
TestWriteHeaders
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Brophy committed Dec 2, 2017
1 parent c9e90b3 commit f7edc6a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions blaster/blaster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@ import (
"github.com/pkg/errors"
)

func TestWriteHeaders(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
b := New(ctx, cancel)
log := NewLoggingReadWriteCloser("")
b.SetLog(log)
b.LogData = []string{"a", "b"}
b.LogOutput = []string{"c", "d"}
must(t, b.WriteLogHeaders())
b.Exit()
log.mustWrite(t)
log.mustClose(t)
if log.Buf.String() != "hash,result,a,b,c,d\n" {
t.Fatalf("Log headers not correct. Got: %s", log.Buf.String())
}
}

func TestOpenData(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())

Expand Down

0 comments on commit f7edc6a

Please sign in to comment.