Skip to content

Commit 3f4cf92

Browse files
committed
Added upgrade tests
Signed-off-by: Aayush Chouhan <[email protected]>
1 parent 7bc42c2 commit 3f4cf92

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed

.github/workflows/upgrade-tests.yaml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Upgrade Tests
2+
on: [push, pull_request, workflow_dispatch]
3+
4+
jobs:
5+
upgrade-tests:
6+
runs-on: ubuntu-latest
7+
timeout-minutes: 90
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
env:
13+
BRANCH_NAME: ${{ github.event.inputs.branch || 'master' }}
14+
15+
steps:
16+
- name: Checkout noobaa-core (master/input branch)
17+
uses: actions/checkout@v4
18+
with:
19+
repository: 'noobaa/noobaa-core'
20+
path: 'noobaa-core'
21+
ref: ${{ env.BRANCH_NAME }}
22+
23+
- name: Deploy minikube
24+
run: |
25+
cd ./noobaa-core
26+
sudo bash ./.travis/deploy_minikube.sh
27+
28+
- name: Build noobaa tester (from master)
29+
run: |
30+
cd ./noobaa-core
31+
make tester TESTER_TAG=noobaa-tester:upgrade-tests
32+
docker tag noobaa:latest noobaa-core:upgrade-tests
33+
34+
- name: Checkout noobaa-operator
35+
uses: actions/checkout@v3
36+
with:
37+
repository: 'noobaa/noobaa-operator'
38+
path: 'noobaa-operator'
39+
40+
- name: Change settings for k8s and minikube
41+
run: |
42+
sudo mv /root/.kube /root/.minikube $HOME
43+
sudo chown -R $USER $HOME/.kube $HOME/.minikube
44+
sed "s/root/home\/$USER/g" $HOME/.kube/config > tmp; mv tmp $HOME/.kube/config
45+
46+
- name: Build operator
47+
run: |
48+
cd ./noobaa-operator
49+
make all
50+
51+
- name: Install noobaa system
52+
run: |
53+
cd ./noobaa-operator
54+
./build/_output/bin/noobaa-operator crd create
55+
./build/_output/bin/noobaa-operator operator install
56+
./build/_output/bin/noobaa-operator system create \
57+
--db-resources='{ "limits": {"cpu": "200m","memory": "2G"}, "requests": {"cpu": "200m","memory": "2G"}}' \
58+
--core-resources='{ "limits": {"cpu": "200m","memory": "1G"}, "requests": {"cpu": "200m","memory": "1G"}}' \
59+
--endpoint-resources='{ "limits": {"cpu": "200m","memory": "1G"}, "requests": {"cpu": "200m","memory": "1G"}}' \
60+
--noobaa-image='noobaa-core:upgrade-tests'
61+
./build/_output/bin/noobaa-operator status
62+
63+
- name: Wait for phase Ready in the backingstore pod
64+
run: |
65+
cd ./noobaa-operator
66+
./.travis/number_of_pods_in_system.sh --pods 5
67+
kubectl wait --for=condition=available backingstore/noobaa-default-backing-store --timeout=5m
68+
69+
- name: Checkout noobaa-core (latest)
70+
uses: actions/checkout@v4
71+
with:
72+
repository: 'noobaa/noobaa-core'
73+
path: 'noobaa-core'
74+
75+
- name: Run Upgrade Tests (PR code)
76+
run: |
77+
set -x
78+
cd ./noobaa-core
79+
make test-upgrade

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ test-external-pg-sanity: build-ssl-postgres
332332
@$(call remove_docker_network)
333333
.PHONY: test-external-pg-sanity
334334

335+
test-upgrade: tester
336+
@echo "\033[1;34mRunning Upgrade Tests - after upgrading from 5.17.0 to latest\033[0m"
337+
./src/test/system_tests/run_upgrade_tests.sh || exit 1
338+
.PHONY: test-upgrade
339+
335340
clean:
336341
@echo Stopping and Deleting containers
337342
@$(CONTAINER_ENGINE) ps -a | grep noobaa_ | awk '{print $1}' | xargs $(CONTAINER_ENGINE) stop &> /dev/null
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
echo "Executing upgrade tests..."
2+
# TODO

0 commit comments

Comments
 (0)