Skip to content

Commit

Permalink
Update kpt to latest references
Browse files Browse the repository at this point in the history
  • Loading branch information
phanimarupaka committed Oct 15, 2020
1 parent 0344e56 commit 985bfcf
Show file tree
Hide file tree
Showing 7 changed files with 316 additions and 62 deletions.
11 changes: 5 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ require (
github.com/posener/complete/v2 v2.0.1-alpha.12
github.com/spf13/cobra v1.0.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.4.0
golang.org/x/crypto v0.0.0-20200221170553-0f24fbd83dfb // indirect
github.com/stretchr/testify v1.6.1
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
gotest.tools v2.2.0+incompatible
k8s.io/apimachinery v0.17.3
k8s.io/cli-runtime v0.17.3
Expand All @@ -24,7 +23,7 @@ require (
// Currently, we have to import the latest version of kubectl.
// Once there is a 0.18 release, we can import a semver release.
k8s.io/kubectl v0.0.0-20191219154910-1528d4eea6dd
sigs.k8s.io/cli-utils v0.20.3-0.20200925182448-8e98b5a5ff43
sigs.k8s.io/kustomize/cmd/config v0.8.2-0.20200924195921-3a5951563dec
sigs.k8s.io/kustomize/kyaml v0.8.2-0.20200924195921-3a5951563dec
sigs.k8s.io/cli-utils v0.20.5
sigs.k8s.io/kustomize/cmd/config v0.8.3
sigs.k8s.io/kustomize/kyaml v0.9.2
)
343 changes: 299 additions & 44 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions internal/cmdexport/cmdexport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var testCases = []TestCase{
params: []string{".", "--workflow", "github-actions"},
expected: `
name: kpt
on:
"on":
push:
branches:
- master
Expand All @@ -82,7 +82,7 @@ jobs:
},
expected: `
name: kpt
on:
"on":
push:
branches:
- master
Expand All @@ -104,7 +104,7 @@ jobs:
params: []string{".", "--fn-path", "function.yaml", "-w", "github-actions"},
expected: `
name: kpt
on:
"on":
push:
branches:
- master
Expand Down
6 changes: 3 additions & 3 deletions internal/cmdexport/orchestrators/githubactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var githubActionsTestCases = []testCase{
},
expected: `
name: kpt
on:
"on":
push:
branches:
- master
Expand All @@ -48,7 +48,7 @@ jobs:
},
expected: `
name: kpt
on:
"on":
push:
branches:
- master
Expand All @@ -70,7 +70,7 @@ jobs:
},
expected: `
name: kpt
on:
"on":
push:
branches:
- master
Expand Down
2 changes: 1 addition & 1 deletion internal/util/cmdutil/cmdutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func PrintErrorStacktrace(err error) {
e := os.Getenv(StackTraceOnErrors)
if StackOnError || e == trueString || e == "1" {
if err, ok := err.(*errors.Error); ok {
fmt.Fprint(os.Stderr, fmt.Sprintf("%s", err.Stack()))
fmt.Fprintf(os.Stderr, "%s", err.Stack())
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions internal/util/functions/functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var tests = []testCase{
{
name: "starlarkFunctions",
inputs: map[string]string{
"Kptfile": fmt.Sprintf(`
"Kptfile": `
apiVersion: kpt.dev/v1alpha1
kind: Kptfile
metadata:
Expand All @@ -41,7 +41,7 @@ functions:
starlarkFunctions:
- name: func
path: reconcile.star
`),
`,

"deploy.yaml": `
apiVersion: apps/v1
Expand Down Expand Up @@ -90,7 +90,7 @@ spec:
name: "starlarkFunctions-nested",
parent: "a",
inputs: map[string]string{
"Kptfile": fmt.Sprintf(`
"Kptfile": `
apiVersion: kpt.dev/v1alpha1
kind: Kptfile
metadata:
Expand All @@ -99,7 +99,7 @@ functions:
starlarkFunctions:
- name: func
path: reconcile.star
`),
`,

"deploy.yaml": `
apiVersion: apps/v1
Expand Down
2 changes: 1 addition & 1 deletion internal/util/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
func AssertNoError(t *testing.T, err error, msgAndArgs ...interface{}) {
if !assert.NoError(t, err, msgAndArgs) {
if err, ok := err.(*errors.Error); ok {
fmt.Fprint(os.Stderr, fmt.Sprintf("%s", err.Stack()))
fmt.Fprintf(os.Stderr, "%s", err.Stack())
}
t.FailNow()
}
Expand Down

0 comments on commit 985bfcf

Please sign in to comment.