Skip to content

Commit

Permalink
test to demonstrate issue with create check
Browse files Browse the repository at this point in the history
  • Loading branch information
natasha41575 committed Apr 7, 2022
1 parent 0989b26 commit e428a39
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions api/filters/replacement/replacement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2317,6 +2317,38 @@ spec:
- containerPort: 80
`,
},
"create Job spec": {
input: `apiVersion: batch/v1
kind: Job
metadata:
name: hello
---
apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
containers:
- image: busybox
name: myapp-container
restartPolicy: OnFailure
`,
replacements: `replacements:
- source:
kind: Pod
name: my-pod
fieldPath: spec
targets:
- select:
name: hello
kind: Job
fieldPaths:
- spec.template.spec
options:
create: true
`,
expectedErr: `cannot use create option in a multi-value target`,
},
}

for tn, tc := range testCases {
Expand Down

0 comments on commit e428a39

Please sign in to comment.