Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test]: added chainsaw tests for nimbus-kyverno-adapter #106

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 36 additions & 33 deletions tests/controllers/nimbuspolicy/delete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,65 @@
This test validates that when a NimbusPolicy is directly deleted, nimbus automatically re-creates the deleted NimbusPolicy or not.


### Steps
## 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 |
| # | Name | Bindings | Try | Catch | Finally |
|:-:|---|:-:|:-:|:-:|:-:|
| 1 | [Create a SecurityIntent](#step-Create a SecurityIntent) | 0 | 1 | 0 | 0 |
| 2 | [Create a SecurityIntentBinding](#step-Create a SecurityIntentBinding) | 0 | 1 | 0 | 0 |
| 3 | [Verity NimbusPolicy creation](#step-Verity NimbusPolicy creation) | 0 | 1 | 0 | 0 |
| 4 | [Delete existing NimbusPolicy](#step-Delete existing NimbusPolicy) | 0 | 1 | 0 | 0 |
| 5 | [Verify NimbusPolicy recreation](#step-Verify NimbusPolicy recreation) | 0 | 1 | 0 | 0 |

## Step: `Create a SecurityIntent`
### Step: `Create a SecurityIntent`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `apply` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `apply` | 0 | 0 | *No description* |

## Step: `Create a SecurityIntentBinding`
### Step: `Create a SecurityIntentBinding`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `apply` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `apply` | 0 | 0 | *No description* |

## Step: `Verity NimbusPolicy creation`
### Step: `Verity NimbusPolicy creation`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `assert` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `assert` | 0 | 0 | *No description* |

## Step: `Delete existing NimbusPolicy`
### Step: `Delete existing NimbusPolicy`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `delete` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `delete` | 0 | 0 | *No description* |

## Step: `Verify NimbusPolicy recreation`
### Step: `Verify NimbusPolicy recreation`

*No description*

### Try
#### Try

| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `assert` | 0 | 0 | *No description* |

---

| # | Operation | Description |
|:-:|---|---|
| 1 | `assert` | *No description* |
69 changes: 36 additions & 33 deletions tests/controllers/nimbuspolicy/update/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,65 @@
This test validates that direct updates to a NimbusPolicy resource are ignored, to maintain consistency and prevent unintended modifications.


### Steps
## 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 | [Update existing NimbusPolicy](#step-Update existing NimbusPolicy) | 1 | 0 | 0 |
| 5 | [Verify discarding of changes to NimbusPolicy](#step-Verify discarding of changes to NimbusPolicy) | 1 | 0 | 0 |
| # | Name | Bindings | Try | Catch | Finally |
|:-:|---|:-:|:-:|:-:|:-:|
| 1 | [Create a SecurityIntent](#step-Create a SecurityIntent) | 0 | 1 | 0 | 0 |
| 2 | [Create a SecurityIntentBinding](#step-Create a SecurityIntentBinding) | 0 | 1 | 0 | 0 |
| 3 | [Verity NimbusPolicy creation](#step-Verity NimbusPolicy creation) | 0 | 1 | 0 | 0 |
| 4 | [Update existing NimbusPolicy](#step-Update existing NimbusPolicy) | 0 | 1 | 0 | 0 |
| 5 | [Verify discarding of changes to NimbusPolicy](#step-Verify discarding of changes to NimbusPolicy) | 0 | 1 | 0 | 0 |

## Step: `Create a SecurityIntent`
### Step: `Create a SecurityIntent`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `apply` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `apply` | 0 | 0 | *No description* |

## Step: `Create a SecurityIntentBinding`
### Step: `Create a SecurityIntentBinding`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `apply` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `apply` | 0 | 0 | *No description* |

## Step: `Verity NimbusPolicy creation`
### Step: `Verity NimbusPolicy creation`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `assert` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `assert` | 0 | 0 | *No description* |

## Step: `Update existing NimbusPolicy`
### Step: `Update existing NimbusPolicy`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `apply` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `apply` | 0 | 0 | *No description* |

## Step: `Verify discarding of changes to NimbusPolicy`
### Step: `Verify discarding of changes to NimbusPolicy`

*No description*

### Try
#### Try

| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `assert` | 0 | 0 | *No description* |

---

| # | Operation | Description |
|:-:|---|---|
| 1 | `assert` | *No description* |
33 changes: 18 additions & 15 deletions tests/controllers/securityintent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,32 @@
This test validates that the created SecurityIntent status subresource contains the ID and action fields with the corresponding intent values.


### Steps
## Steps

| # | Name | Try | Catch | Finally |
|:-:|---|:-:|:-:|:-:|
| 1 | [Create a SecurityIntent](#step-Create a SecurityIntent) | 1 | 0 | 0 |
| 2 | [Verify status of created SecurityIntent](#step-Verify status of created SecurityIntent) | 1 | 0 | 0 |
| # | Name | Bindings | Try | Catch | Finally |
|:-:|---|:-:|:-:|:-:|:-:|
| 1 | [Create a SecurityIntent](#step-Create a SecurityIntent) | 0 | 1 | 0 | 0 |
| 2 | [Verify status of created SecurityIntent](#step-Verify status of created SecurityIntent) | 0 | 1 | 0 | 0 |

## Step: `Create a SecurityIntent`
### Step: `Create a SecurityIntent`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `apply` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `apply` | 0 | 0 | *No description* |

## Step: `Verify status of created SecurityIntent`
### Step: `Verify status of created SecurityIntent`

*No description*

### Try
#### Try

| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `assert` | 0 | 0 | *No description* |

---

| # | Operation | Description |
|:-:|---|---|
| 1 | `assert` | *No description* |
69 changes: 36 additions & 33 deletions tests/controllers/securityintentbinding/create/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,66 @@
This test validates the automated creation of a NimbusPolicy resource when a corresponding SecurityIntent and SecurityIntentBinding are created.


### Steps
## 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 | [Verify status of created SecurityIntentBinding](#step-Verify status of created SecurityIntentBinding) | 1 | 0 | 0 |
| 5 | [Verify status of created NimbusPolicy](#step-Verify status of created NimbusPolicy) | 1 | 0 | 0 |
| # | Name | Bindings | Try | Catch | Finally |
|:-:|---|:-:|:-:|:-:|:-:|
| 1 | [Create a SecurityIntent](#step-Create a SecurityIntent) | 0 | 1 | 0 | 0 |
| 2 | [Create a SecurityIntentBinding](#step-Create a SecurityIntentBinding) | 0 | 1 | 0 | 0 |
| 3 | [Verity NimbusPolicy creation](#step-Verity NimbusPolicy creation) | 0 | 1 | 0 | 0 |
| 4 | [Verify status of created SecurityIntentBinding](#step-Verify status of created SecurityIntentBinding) | 0 | 1 | 0 | 0 |
| 5 | [Verify status of created NimbusPolicy](#step-Verify status of created NimbusPolicy) | 0 | 1 | 0 | 0 |

## Step: `Create a SecurityIntent`
### Step: `Create a SecurityIntent`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `apply` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `apply` | 0 | 0 | *No description* |

## Step: `Create a SecurityIntentBinding`
### Step: `Create a SecurityIntentBinding`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `apply` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `apply` | 0 | 0 | *No description* |

## Step: `Verity NimbusPolicy creation`
### Step: `Verity NimbusPolicy creation`

*No description*

### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `assert` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `assert` | 0 | 0 | *No description* |

## Step: `Verify status of created SecurityIntentBinding`
### Step: `Verify status of created SecurityIntentBinding`

Verify the created SecurityIntentBinding status subresource includes the number and names of bound intents, along with the generated NimbusPolicy name.


### Try
#### Try

| # | Operation | Description |
|:-:|---|---|
| 1 | `assert` | *No description* |
| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `assert` | 0 | 0 | *No description* |

## Step: `Verify status of created NimbusPolicy`
### Step: `Verify status of created NimbusPolicy`

*No description*

### Try
#### Try

| # | Operation | Bindings | Outputs | Description |
|:-:|---|:-:|:-:|---|
| 1 | `assert` | 0 | 0 | *No description* |

---

| # | Operation | Description |
|:-:|---|---|
| 1 | `assert` | *No description* |
Loading
Loading