
Render command filters documents and prints them to user-defined output in a form of multi-document YAML. Sub-command receives following document filter flags: * label * annotation * apiVersion (a.k.a group-version) * kind * filter Related: #16 Change-Id: I7efb0a478e1070efd1791ab10d7c3946c8c28630
27 lines
485 B
Go
27 lines
485 B
Go
package document_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"opendev.org/airship/airshipctl/cmd/document"
|
|
"opendev.org/airship/airshipctl/testutil"
|
|
)
|
|
|
|
func TestDocument(t *testing.T) {
|
|
tests := []*testutil.CmdTest{
|
|
{
|
|
Name: "document-with-defaults",
|
|
CmdLine: "",
|
|
Cmd: document.NewDocumentCommand(nil),
|
|
},
|
|
{
|
|
Name: "document-render-with-help",
|
|
CmdLine: "-h",
|
|
Cmd: document.NewRenderCommand(nil),
|
|
},
|
|
}
|
|
for _, tt := range tests {
|
|
testutil.RunTest(t, tt)
|
|
}
|
|
}
|