Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
0064c6f5
Unverified
Commit
0064c6f5
authored
Sep 27, 2018
by
k8s-ci-robot
Committed by
GitHub
Sep 27, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68983 from dims/fix-man-pages-to-build-reproducibly
Fix for man pages do not build reproducibly
parents
52b7f6f0
f7777152
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
0 deletions
+18
-0
jsonpath_flags.go
...8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags.go
+2
-0
jsonpath_flags_test.go
.../cli-runtime/pkg/genericclioptions/jsonpath_flags_test.go
+7
-0
template_flags.go
...8s.io/cli-runtime/pkg/genericclioptions/template_flags.go
+2
-0
template_flags_test.go
.../cli-runtime/pkg/genericclioptions/template_flags_test.go
+7
-0
No files found.
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags.go
View file @
0064c6f5
...
...
@@ -19,6 +19,7 @@ package genericclioptions
import
(
"fmt"
"io/ioutil"
"sort"
"strings"
"github.com/spf13/cobra"
...
...
@@ -49,6 +50,7 @@ func (f *JSONPathPrintFlags) AllowedFormats() []string {
for
format
:=
range
jsonFormats
{
formats
=
append
(
formats
,
format
)
}
sort
.
Strings
(
formats
)
return
formats
}
...
...
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags_test.go
View file @
0064c6f5
...
...
@@ -21,6 +21,7 @@ import (
"fmt"
"io/ioutil"
"os"
"sort"
"strings"
"testing"
...
...
@@ -101,6 +102,9 @@ func TestPrinterSupportsExpectedJSONPathFormats(t *testing.T) {
printFlags
:=
JSONPathPrintFlags
{
TemplateArgument
:
templateArg
,
}
if
!
sort
.
StringsAreSorted
(
printFlags
.
AllowedFormats
())
{
t
.
Fatalf
(
"allowed formats are not sorted"
)
}
p
,
err
:=
printFlags
.
ToPrinter
(
tc
.
outputFormat
)
if
tc
.
expectNoMatch
{
...
...
@@ -180,6 +184,9 @@ func TestJSONPathPrinterDefaultsAllowMissingKeysToTrue(t *testing.T) {
TemplateArgument
:
&
tc
.
templateArg
,
AllowMissingKeys
:
tc
.
allowMissingKeys
,
}
if
!
sort
.
StringsAreSorted
(
printFlags
.
AllowedFormats
())
{
t
.
Fatalf
(
"allowed formats are not sorted"
)
}
outputFormat
:=
"jsonpath"
p
,
err
:=
printFlags
.
ToPrinter
(
outputFormat
)
...
...
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/template_flags.go
View file @
0064c6f5
...
...
@@ -19,6 +19,7 @@ package genericclioptions
import
(
"fmt"
"io/ioutil"
"sort"
"strings"
"github.com/spf13/cobra"
...
...
@@ -51,6 +52,7 @@ func (f *GoTemplatePrintFlags) AllowedFormats() []string {
for
format
:=
range
templateFormats
{
formats
=
append
(
formats
,
format
)
}
sort
.
Strings
(
formats
)
return
formats
}
...
...
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/template_flags_test.go
View file @
0064c6f5
...
...
@@ -21,6 +21,7 @@ import (
"fmt"
"io/ioutil"
"os"
"sort"
"strings"
"testing"
...
...
@@ -101,6 +102,9 @@ func TestPrinterSupportsExpectedTemplateFormats(t *testing.T) {
printFlags
:=
GoTemplatePrintFlags
{
TemplateArgument
:
templateArg
,
}
if
!
sort
.
StringsAreSorted
(
printFlags
.
AllowedFormats
())
{
t
.
Fatalf
(
"allowed formats are not sorted"
)
}
p
,
err
:=
printFlags
.
ToPrinter
(
tc
.
outputFormat
)
if
tc
.
expectNoMatch
{
...
...
@@ -174,6 +178,9 @@ func TestTemplatePrinterDefaultsAllowMissingKeysToTrue(t *testing.T) {
TemplateArgument
:
&
tc
.
templateArg
,
AllowMissingKeys
:
tc
.
allowMissingKeys
,
}
if
!
sort
.
StringsAreSorted
(
printFlags
.
AllowedFormats
())
{
t
.
Fatalf
(
"allowed formats are not sorted"
)
}
outputFormat
:=
"template"
p
,
err
:=
printFlags
.
ToPrinter
(
outputFormat
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment