diff --git a/pkg/output/tap.go b/pkg/output/tap.go index 9803f5f..8ef8563 100644 --- a/pkg/output/tap.go +++ b/pkg/output/tap.go @@ -32,6 +32,11 @@ func tapOutput(w io.Writer, withSummary bool, isStdin, verbose bool) Output { // JSON.Write will only write when JSON.Flush has been called func (o *tapo) Write(res validator.Result) error { o.index++ + + if o.index == 1 { + fmt.Fprintf(o.w, "TAP version 13\n") + } + switch res.Status { case validator.Valid: sig, _ := res.Resource.Signature() diff --git a/pkg/output/tap_test.go b/pkg/output/tap_test.go index 1a8b632..3cce4a2 100644 --- a/pkg/output/tap_test.go +++ b/pkg/output/tap_test.go @@ -36,7 +36,7 @@ metadata: Err: nil, }, }, - "ok 1 - deployment.yml (Deployment)\n1..1\n", + "TAP version 13\nok 1 - deployment.yml (Deployment)\n1..1\n", }, { "a single deployment, verbose, with summary", @@ -57,7 +57,7 @@ metadata: Err: nil, }, }, - "ok 1 - deployment.yml (Deployment)\n1..1\n", + "TAP version 13\nok 1 - deployment.yml (Deployment)\n1..1\n", }, } { w := new(bytes.Buffer)