mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
improve format
This commit is contained in:
@@ -31,7 +31,7 @@ func (s StringList) Has(val []string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func isStringSliceEqual (s []string, t []string) bool {
|
func isStringSliceEqual(s []string, t []string) bool {
|
||||||
if len(s) != len(t) {
|
if len(s) != len(t) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1288,9 +1288,9 @@ spec:
|
|||||||
//
|
//
|
||||||
// Test Case
|
// Test Case
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
description: `Add a containerPort with protocol to an existing list`,
|
description: `Add a containerPort with protocol to an existing list`,
|
||||||
origin: `
|
origin: `
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
spec:
|
spec:
|
||||||
@@ -1303,7 +1303,7 @@ spec:
|
|||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
protocol: UDP
|
protocol: UDP
|
||||||
`,
|
`,
|
||||||
update: `
|
update: `
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
spec:
|
spec:
|
||||||
@@ -1318,7 +1318,7 @@ spec:
|
|||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
`,
|
`,
|
||||||
local: `
|
local: `
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
spec:
|
spec:
|
||||||
@@ -1331,7 +1331,7 @@ spec:
|
|||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
protocol: UDP
|
protocol: UDP
|
||||||
`, // output should have both
|
`, // output should have both
|
||||||
expected: `
|
expected: `
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
spec:
|
spec:
|
||||||
@@ -1345,15 +1345,15 @@ spec:
|
|||||||
protocol: UDP
|
protocol: UDP
|
||||||
`},
|
`},
|
||||||
|
|
||||||
//
|
//
|
||||||
// Test Case
|
// Test Case
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
description: `Add a containerPort with protocol to a non-existing list, existing in dest`,
|
description: `Add a containerPort with protocol to a non-existing list, existing in dest`,
|
||||||
origin: `
|
origin: `
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment`,
|
kind: Deployment`,
|
||||||
update: `
|
update: `
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
spec:
|
spec:
|
||||||
@@ -1366,7 +1366,7 @@ spec:
|
|||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
protocol: UDP
|
protocol: UDP
|
||||||
`,
|
`,
|
||||||
local: `
|
local: `
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
spec:
|
spec:
|
||||||
@@ -1379,7 +1379,7 @@ spec:
|
|||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
`, // output should have both
|
`, // output should have both
|
||||||
expected: `
|
expected: `
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
Reference in New Issue
Block a user