-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from VedRatan/test
added integration tests
- Loading branch information
Showing
28 changed files
with
786 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2023 Authors of Nimbus | ||
|
||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Configuration | ||
metadata: | ||
name: configuration | ||
spec: | ||
parallel: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Test: `nimbuspolicy-deletion` | ||
|
||
This test validates that when a NimbusPolicy is directly deleted, nimbus automatically re-creates the deleted NimbusPolicy or not. | ||
|
||
|
||
### Steps | ||
|
||
| # | Name | Try | Catch | Finally | | ||
|:-:|---|:-:|:-:|:-:| | ||
| 1 | [Create a SecurityIntent](#step-Create a SecurityIntent) | 1 | 0 | 0 | | ||
| 2 | [Create a SecurityIntentBinding](#step-Create a SecurityIntentBinding) | 1 | 0 | 0 | | ||
| 3 | [Verity NimbusPolicy creation](#step-Verity NimbusPolicy creation) | 1 | 0 | 0 | | ||
| 4 | [Delete existing NimbusPolicy](#step-Delete existing NimbusPolicy) | 1 | 0 | 0 | | ||
| 5 | [Verify NimbusPolicy recreation](#step-Verify NimbusPolicy recreation) | 1 | 0 | 0 | | ||
|
||
## Step: `Create a SecurityIntent` | ||
|
||
*No description* | ||
|
||
### Try | ||
|
||
| # | Operation | Description | | ||
|:-:|---|---| | ||
| 1 | `apply` | *No description* | | ||
|
||
## Step: `Create a SecurityIntentBinding` | ||
|
||
*No description* | ||
|
||
### Try | ||
|
||
| # | Operation | Description | | ||
|:-:|---|---| | ||
| 1 | `apply` | *No description* | | ||
|
||
## Step: `Verity NimbusPolicy creation` | ||
|
||
*No description* | ||
|
||
### Try | ||
|
||
| # | Operation | Description | | ||
|:-:|---|---| | ||
| 1 | `assert` | *No description* | | ||
|
||
## Step: `Delete existing NimbusPolicy` | ||
|
||
*No description* | ||
|
||
### Try | ||
|
||
| # | Operation | Description | | ||
|:-:|---|---| | ||
| 1 | `delete` | *No description* | | ||
|
||
## Step: `Verify NimbusPolicy recreation` | ||
|
||
*No description* | ||
|
||
### Try | ||
|
||
| # | Operation | Description | | ||
|:-:|---|---| | ||
| 1 | `assert` | *No description* | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2023 Authors of Nimbus | ||
|
||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
name: nimbuspolicy-deletion | ||
spec: | ||
description: > | ||
This test validates that when a NimbusPolicy is directly deleted, nimbus automatically re-creates the | ||
deleted NimbusPolicy or not. | ||
steps: | ||
- name: "Create a SecurityIntent" | ||
try: | ||
- apply: | ||
file: ../../resources/namespaced/1-dns-manipulation-si.yaml | ||
|
||
- name: "Create a SecurityIntentBinding" | ||
try: | ||
- apply: | ||
file: ../../resources/namespaced/1-dns-manipulation-sib.yaml | ||
|
||
- name: "Verity NimbusPolicy creation" | ||
try: | ||
- assert: | ||
file: ../nimbus-policy-assert.yaml | ||
|
||
- name: "Delete existing NimbusPolicy" | ||
try: | ||
- delete: | ||
ref: | ||
apiVersion: intent.security.nimbus.com/v1 | ||
kind: NimbusPolicy | ||
name: dns-manipulation-binding | ||
expect: | ||
- match: | ||
apiVersion: intent.security.nimbus.com/v1 | ||
kind: NimbusPolicy | ||
name: dns-manipulation-binding | ||
check: | ||
($error != null): true | ||
|
||
- name: "Verify NimbusPolicy recreation" | ||
try: | ||
- assert: | ||
file: ../nimbus-policy-assert.yaml |
Oops, something went wrong.