Skip to content

Commit

Permalink
test: restore K8S plugin 'noapiversion' test logic
Browse files Browse the repository at this point in the history
  • Loading branch information
f1ames committed Aug 25, 2023
1 parent 750135e commit db9662f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ async function processResourcesInFolder(path: string, schemaVersion?: string) {
const files = await readDirectory(path);
const resources = extractK8sResources(files);

resources.forEach(r => {
if (r.apiVersion === 'test-remove') {
(r as any).apiVersion = undefined;
}
});

const parser = new ResourceParser();
const validator = createDefaultMonokleValidator(parser);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ spec:
group:
name: "system:unauthenticated"
---
apiVersion: 'test-remove'
kind: Pod
metadata:
name: pod-warning
Expand Down

0 comments on commit db9662f

Please sign in to comment.