Skip to content

Commit

Permalink
doc: add test cases folder and documentation, updated gitignore and i…
Browse files Browse the repository at this point in the history
…gnored in the publish workflow

Signed-off-by: Paul Bastide <[email protected]>
  • Loading branch information
prb112 committed Jan 30, 2025
1 parent 39e4f68 commit 1be8835
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ on:
paths-ignore:
- 'manifests/**'
- 'examples/**'
- 'tests/**'
- 'README.md'
- '.gitignore'

env:
REGISTRY: quay.io
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
!manifests/webhook/*.yaml
!Makefile

# Tests
!tests/*.md
!tests/*.sh

# Image
!build/Containerfile
!build/Containerfile-build
Expand Down
70 changes: 70 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
This document outlines the test cases:

## *Deployment*

### 1. *Case 1*: Install
Install using README.md

Is the power-device-plugin started?
Does the kubelet recognize the plugin on the workers?

### 2. *Case 2*: Uninstall
Uninstall using README.md

Is the power-device-plugin cleaned up?

### 3. *Case 3*: Upgrade
Upgrade using README.md

Does the Pod report changes, does it restart

## *Use*
The following assume the Device Plugin is installed and registered with `kubelet`.

### 1. *Case 1* Kubelet Restart
1. deploy ex-device-plugin
2. delete ex-device-plugin
3. restart kubelet while delete/create Pod is happening

Kubelet should report correct availability.
Plugin shouldn't report unrecoverable errors.
Pod should deploy.

### 2. *Case 2* Kubelet Restart
1. deploy ex-device-plugin
2. restart kubelet while Pod is running

Kubelet should report correct availability.
Plugin shouldn't report unrecoverable errors.
Pod should deploy.

### 3. *Case 3* Pod Restart
1. deploy ex-device-plugin
2. Loop over Pod deletion/creation at least to the size of the power-dev/dev resource type

Kubelet should report correct availability.
Plugin shouldn't report unrecoverable errors.
Pod should deploy.

This test is to ensure no resource exhaustion.

### 4. *Case 4*: Simple Scale - 2 per available node
1. deploy ex-device-plugin
2. Scale the number of Pods to per Node `oc scale deployment/ex-device-plugin -n ex-device-plugin --replicas=4` 4 if 2 node, 2 if 1 node.

Kubelet should report correct availability.
Plugin shouldn't report unrecoverable errors.
Node should account for resources correctly `oc describe nodes | grep power-dev`
Pods should deploy.

### 5. *Case 5*: Complex Scale - More than available
1. deploy ex-device-plugin
2. Scale the number of Pods over the number of power-dev/dev resource type limit `oc scale deployment/ex-device-plugin -n ex-device-plugin --replicas=50`

Kubelet should report correct availability.
Plugin shouldn't report unrecoverable errors.
Node should account for resources correctly `oc describe nodes | grep power-dev`
Pods should deploy.

## *Security*
These tests cases are to be determined and worked on.

0 comments on commit 1be8835

Please sign in to comment.