Skip to content

Commit fbada64

Browse files
committed
fix the go 1.10 unit test failures
1 parent 83ac5ae commit fbada64

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

pkg/cmd/server/apis/config/v1/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ type UserAgentMatchRule struct {
506506

507507
// UserAgentDenyRule adds a rejection message that can be used to help a user figure out how to get an approved client
508508
type UserAgentDenyRule struct {
509-
UserAgentMatchRule `json:", inline"`
509+
UserAgentMatchRule `json:",inline"`
510510

511511
// RejectionMessage is the message shown when rejecting a client. If it is not a set, the default message is used.
512512
RejectionMessage string `json:"rejectionMessage"`

pkg/cmd/server/start/start_node.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ func execKubelet(kubeletArgs []string) error {
419419
for i, s := range os.Args {
420420
if s == "--vmodule" {
421421
if i+1 < len(os.Args) {
422-
args = append(args, fmt.Sprintf("--vmodule=", os.Args[i+1]))
422+
args = append(args, fmt.Sprintf("--vmodule=%q", os.Args[i+1]))
423423
break
424424
}
425425
}

pkg/oc/cli/describe/describer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1873,7 +1873,7 @@ func describeSecurityContextConstraints(scc *securityapi.SecurityContextConstrai
18731873

18741874
fmt.Fprintf(out, "Settings:\t\n")
18751875
fmt.Fprintf(out, " Allow Privileged:\t%t\n", scc.AllowPrivilegedContainer)
1876-
fmt.Fprintf(out, " Allow Privilege Escalation:\t%t\n", scc.AllowPrivilegeEscalation)
1876+
fmt.Fprintf(out, " Allow Privilege Escalation:\t%v\n", scc.AllowPrivilegeEscalation)
18771877
fmt.Fprintf(out, " Default Add Capabilities:\t%s\n", capsToString(scc.DefaultAddCapabilities))
18781878
fmt.Fprintf(out, " Required Drop Capabilities:\t%s\n", capsToString(scc.RequiredDropCapabilities))
18791879
fmt.Fprintf(out, " Allowed Capabilities:\t%s\n", capsToString(scc.AllowedCapabilities))

test/integration/dockerregistryclient_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func TestRegistryClientConnectPulpRegistry(t *testing.T) {
123123
}, imageNotFoundErrorPatterns...)
124124
if err != nil {
125125
if strings.Contains(err.Error(), "x509: certificate has expired or is not yet valid") {
126-
t.Skip("SKIPPING: due to expired certificate of %s: %v", pulpRegistryName, err)
126+
t.Skipf("SKIPPING: due to expired certificate of %s: %v", pulpRegistryName, err)
127127
}
128128
t.Skip("pulp is failing")
129129
//t.Fatal(err)
@@ -257,6 +257,6 @@ func TestRegistryClientQuayIOImage(t *testing.T) {
257257
return err
258258
}, imageNotFoundErrorPatterns...)
259259
if err != nil {
260-
t.Skip("SKIPPING: unexpected error from quay.io: %v", err)
260+
t.Skipf("SKIPPING: unexpected error from quay.io: %v", err)
261261
}
262262
}

test/integration/imageimporter_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ func TestImageStreamImportRedHatRegistry(t *testing.T) {
10011001
}, imageNotFoundErrorPatterns...)
10021002
if err != nil {
10031003
if strings.Contains(err.Error(), "x509: certificate has expired or is not yet valid") {
1004-
t.Skip("SKIPPING: due to expired certificate of %s: %v", pulpRegistryName, err)
1004+
t.Skipf("SKIPPING: due to expired certificate of %s: %v", pulpRegistryName, err)
10051005
}
10061006
t.Fatal(err.Error())
10071007
}

tools/rebasehelpers/godepchecker/godepchecker.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ func main() {
2525
Assumes the following:
2626
- $GOPATH is set to a single directory (not the godepsified path)
2727
- "godeps save ./..." has not yet been run on origin
28-
- The desired level of kubernetes is checked out
29-
`)
28+
- The desired level of kubernetes is checked out`)
3029
var self, other string
3130
var checkoutNewer, examineForks bool
3231
flag.StringVar(&self, "self", filepath.Join(gopath, "src/github.com/openshift/origin/Godeps/Godeps.json"), "The first file to compare")

0 commit comments

Comments
 (0)