Skip to content

Commit

Permalink
test: add no-deprecated-resource tests
Browse files Browse the repository at this point in the history
  • Loading branch information
madbence committed Nov 1, 2020
1 parent 62ff0eb commit 21a3c23
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
32 changes: 32 additions & 0 deletions regression-tests/__snapshots__/regresion.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,38 @@ Array [
"path": "./regression-tests/eventlistener-test.yaml",
"rule": "no-missing-resource",
},
Object {
"level": "warning",
"loc": Object {
"endColumn": 32,
"endLine": 7,
"range": Array [
126,
130,
],
"startColumn": 28,
"startLine": 7,
},
"message": "Task 'no-deprecated-resource-1' is deprecated!",
"path": "./regression-tests/no-deprecated-resource.yaml",
"rule": "no-deprecated-resource",
},
Object {
"level": "warning",
"loc": Object {
"endColumn": 32,
"endLine": 23,
"range": Array [
386,
390,
],
"startColumn": 28,
"startLine": 23,
},
"message": "Pipeline 'no-deprecated-resource-1' is deprecated!",
"path": "./regression-tests/no-deprecated-resource.yaml",
"rule": "no-deprecated-resource",
},
Object {
"level": "warning",
"loc": Object {
Expand Down
33 changes: 33 additions & 0 deletions regression-tests/no-deprecated-resource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: no-deprecated-resource-1
labels:
tekton.dev/deprecated: true
spec:
steps: []
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: no-deprecated-resource-2
spec:
steps: []
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: no-deprecated-resource-1
labels:
tekton.dev/deprecated: true
spec:
tasks: []
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: no-deprecated-resource-2
labels: {}
spec:
tasks: []

0 comments on commit 21a3c23

Please sign in to comment.