mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-20 10:27:02 +00:00
Add TAP header
This commit is contained in:
parent
07dec90112
commit
69e2fc8ba9
2 changed files with 7 additions and 2 deletions
|
|
@ -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
|
// JSON.Write will only write when JSON.Flush has been called
|
||||||
func (o *tapo) Write(res validator.Result) error {
|
func (o *tapo) Write(res validator.Result) error {
|
||||||
o.index++
|
o.index++
|
||||||
|
|
||||||
|
if o.index == 1 {
|
||||||
|
fmt.Fprintf(o.w, "TAP version 13\n")
|
||||||
|
}
|
||||||
|
|
||||||
switch res.Status {
|
switch res.Status {
|
||||||
case validator.Valid:
|
case validator.Valid:
|
||||||
sig, _ := res.Resource.Signature()
|
sig, _ := res.Resource.Signature()
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ metadata:
|
||||||
Err: nil,
|
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",
|
"a single deployment, verbose, with summary",
|
||||||
|
|
@ -57,7 +57,7 @@ metadata:
|
||||||
Err: nil,
|
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)
|
w := new(bytes.Buffer)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue