Skip to content

Commit a8cae1a

Browse files
committed
tests: Add solution upgrade test
Before this the solution-next ISO was not used at all, so let's fix it and add a simple test for solution upgrade
1 parent 2dc2783 commit a8cae1a

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

.github/workflows/multi-node-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ on:
6262
description: "The solution version to install"
6363
required: false
6464
type: string
65-
default: "1.1.0"
65+
default: "1.1.1"
6666
solution-base-url:
6767
description: "The URL to download the solution"
6868
required: false

.github/workflows/single-node-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ jobs:
226226
if: inputs.test-solution
227227
uses: ./.github/actions/bastion-tests
228228
with:
229-
PYTEST_FILTERS: "solution"
229+
PYTEST_FILTERS: "solution-upgrade"
230230
- name: Run tests from Bastion
231231
uses: ./.github/actions/bastion-tests
232232
with:

tests/post/features/solutions.feature

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,39 @@ Feature: Solutions
2323
And we delete the Solution Configuration file
2424
Then we have no Solution 'example-solution' archive mounted
2525
And we have no Solution Configuration file present
26+
27+
@solution-upgrade
28+
Scenario: Upgrade Solution
29+
Given the Kubernetes API is available
30+
And no Solution 'example-solution' is imported
31+
And no Solution environment 'example-environment' is available
32+
And the Solution Configuration file is absent
33+
When we import a Solution archive '/var/tmp/example-solution.iso'
34+
Then Solution archive 'example-solution' is imported correctly
35+
And Solution 'example-solution' version '1.1.0' is available
36+
When we activate Solution 'example-solution' version '1.1.0'
37+
Then Solution 'example-solution' version '1.1.0' is activated
38+
And CRD 'versionservers.metalk8s-solution-example.scality.com' exists in Kubernetes API
39+
And CRD 'clockservers.metalk8s-solution-example.scality.com' exists in Kubernetes API
40+
When we create a solution environment 'example-environment'
41+
Then solution environment 'example-environment' is available
42+
When we deploy Solution 'example-solution' in environment 'example-environment' with version '1.1.0'
43+
Then we have 1 running pod labeled 'app=example-solution-operator' in namespace 'example-environment'
44+
When we import a Solution archive '/var/tmp/example-solution-next.iso'
45+
Then Solution archive 'example-solution-next' is imported correctly
46+
And Solution 'example-solution-next' version '1.1.1' is available
47+
When we activate Solution 'example-solution-next' version '1.1.1'
48+
Then Solution 'example-solution-next' version '1.1.1' is activated
49+
And CRD 'versionservers.example-solution-next.metalk8s.scality.com' exists in Kubernetes API
50+
And CRD 'clockservers.example-solution-next.metalk8s.scality.com' exists in Kubernetes API
51+
When we deploy Solution 'example-solution' in environment 'example-environment' with version '1.1.1'
52+
Then we have 1 running pod labeled 'app=example-solution-operator,app.kubernetes.io/version=1.1.1' in namespace 'example-environment'
53+
When we unimport Solution archive '/var/tmp/example-solution.iso'
54+
Then we have 1 running pod labeled 'app=example-solution-operator' in namespace 'example-environment'
55+
When we deactivate Solution 'example-solution'
56+
And we delete Solution 'example-solution' in environment 'example-environment'
57+
And we delete Solution environment 'example-environment'
58+
And we unimport Solution archive '/var/tmp/example-solution-next.iso'
59+
And we delete the Solution Configuration file
60+
Then we have no Solution 'example-solution' archive mounted
61+
And we have no Solution Configuration file present

0 commit comments

Comments
 (0)