Skip to content

Commit 12cdfd3

Browse files
committed
Add HA tests
1 parent df26f96 commit 12cdfd3

6 files changed

Lines changed: 9566 additions & 28 deletions

File tree

test/integration/Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: integration-build integration-docker-build integration-run integration-clean integration-docker-run all
1+
.PHONY: integration-build integration-docker-build integration-run integration-run-sno integration-run-mno integration-clean integration-docker-run all
22

33
# Variables
44
BINARY = integration-test
@@ -17,13 +17,23 @@ integration-build:
1717
integration-docker-build:
1818
cd ../.. && docker build -t $(FULL_IMAGE) -f test/integration/Dockerfile .
1919

20-
# Run integration tests locally (binary)
20+
# Run all integration tests (SNO + MNO)
2121
integration-run: integration-build
22-
./$(BINARY) run-suite openshift/lvm-operator/test/integration
22+
./$(BINARY) run-suite -c 1 openshift/lvm-operator/test/integration/qe_tests/sno
23+
./$(BINARY) run-suite -c 1 openshift/lvm-operator/test/integration/qe_tests/mno
24+
25+
# Run only SNO tests
26+
integration-run-sno: integration-build
27+
./$(BINARY) run-suite -c 1 openshift/lvm-operator/test/integration/qe_tests/sno
28+
29+
# Run only MNO tests
30+
integration-run-mno: integration-build
31+
./$(BINARY) run-suite -c 1 openshift/lvm-operator/test/integration/qe_tests/mno
2332

2433
# Run integration tests in Docker container
2534
integration-docker-run: integration-docker-build
26-
docker run --rm $(FULL_IMAGE) run-suite openshift/lvm-operator/test/integration
35+
docker run --rm $(FULL_IMAGE) run-suite -c 1 openshift/lvm-operator/test/integration/qe_tests/sno
36+
docker run --rm $(FULL_IMAGE) run-suite -c 1 openshift/lvm-operator/test/integration/qe_tests/mno
2737

2838

2939
# Clean up local binary and Docker image

test/integration/go.mod

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
k8s.io/api v0.34.1
1414
k8s.io/apimachinery v0.34.1
1515
k8s.io/client-go v0.34.1
16-
k8s.io/kubernetes v1.34.1
16+
k8s.io/klog/v2 v2.130.1
1717
sigs.k8s.io/controller-runtime v0.22.4
1818
)
1919

@@ -27,7 +27,6 @@ require (
2727
cel.dev/expr v0.24.0 // indirect
2828
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
2929
github.com/beorn7/perks v1.0.1 // indirect
30-
github.com/blang/semver/v4 v4.0.0 // indirect
3130
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3231
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3332
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
@@ -67,8 +66,6 @@ require (
6766
github.com/spf13/pflag v1.0.7 // indirect
6867
github.com/stoewer/go-strcase v1.3.0 // indirect
6968
github.com/x448/float16 v0.8.4 // indirect
70-
go.opentelemetry.io/otel v1.35.0 // indirect
71-
go.opentelemetry.io/otel/trace v1.35.0 // indirect
7269
go.yaml.in/yaml/v2 v2.4.2 // indirect
7370
go.yaml.in/yaml/v3 v3.0.4 // indirect
7471
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
@@ -88,11 +85,7 @@ require (
8885
gopkg.in/inf.v0 v0.9.1 // indirect
8986
gopkg.in/yaml.v3 v3.0.1 // indirect
9087
k8s.io/apiextensions-apiserver v0.34.1 // indirect
91-
k8s.io/apiserver v0.34.1 // indirect
92-
k8s.io/component-base v0.34.1 // indirect
93-
k8s.io/klog/v2 v2.130.1 // indirect
9488
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
95-
k8s.io/pod-security-admission v0.0.0 // indirect
9689
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
9790
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
9891
sigs.k8s.io/randfill v1.0.0 // indirect

test/integration/go.sum

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
66
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
77
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
88
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
9-
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
10-
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
119
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
1210
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
1311
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
@@ -92,10 +90,6 @@ github.com/openshift-eng/openshift-tests-extension v0.0.0-20250916161632-d81c090
9290
github.com/openshift-eng/openshift-tests-extension v0.0.0-20250916161632-d81c09058835/go.mod h1:6gkP5f2HL0meusT0Aim8icAspcD1cG055xxBZ9yC68M=
9391
github.com/openshift/api v0.0.0-20251015095338-264e80a2b6e7 h1:Ot2fbEEPmF3WlPQkyEW/bUCV38GMugH/UmZvxpWceNc=
9492
github.com/openshift/api v0.0.0-20251015095338-264e80a2b6e7/go.mod h1:d5uzF0YN2nQQFA0jIEWzzOZ+edmo6wzlGLvx5Fhz4uY=
95-
github.com/openshift/kubernetes v1.30.1-0.20251017123720-96593f323733 h1:Mpab1CmJPLVWGB0CNGoWnup/NScvv55MVPe94c8JgUk=
96-
github.com/openshift/kubernetes v1.30.1-0.20251017123720-96593f323733/go.mod h1:w3+IfrXNp5RosdDXg3LB55yijJqR/FwouvVntYHQf0o=
97-
github.com/openshift/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20251017123720-96593f323733 h1:2vQPmqKwQU+jpqm7Iv3EU3k8DYYNqZwN/A1AdydMYpc=
98-
github.com/openshift/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20251017123720-96593f323733/go.mod h1:yuCdx9wLndqpNhmsYZh48wtbgrqc8ql1191ke9zIOfg=
9993
github.com/openshift/library-go v0.0.0-20251015151611-6fc7a74b67c5 h1:bANtDc8SgetSK4nQehf59x3+H9FqVJCprgjs49/OTg0=
10094
github.com/openshift/library-go v0.0.0-20251015151611-6fc7a74b67c5/go.mod h1:OlFFws1AO51uzfc48MsStGE4SFMWlMZD0+f5a/zCtKI=
10195
github.com/openshift/lvm-operator/v4 v4.20.0 h1:rENUiQPyXnQahFkAwsecpfEGqEDKSSRCkXosX3nou7w=
@@ -140,10 +134,6 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
140134
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
141135
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
142136
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
143-
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
144-
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
145-
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
146-
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
147137
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
148138
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
149139
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
@@ -221,12 +211,8 @@ k8s.io/apiextensions-apiserver v0.34.1 h1:NNPBva8FNAPt1iSVwIE0FsdrVriRXMsaWFMqJb
221211
k8s.io/apiextensions-apiserver v0.34.1/go.mod h1:hP9Rld3zF5Ay2Of3BeEpLAToP+l4s5UlxiHfqRaRcMc=
222212
k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4=
223213
k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
224-
k8s.io/apiserver v0.34.1 h1:U3JBGdgANK3dfFcyknWde1G6X1F4bg7PXuvlqt8lITA=
225-
k8s.io/apiserver v0.34.1/go.mod h1:eOOc9nrVqlBI1AFCvVzsob0OxtPZUCPiUJL45JOTBG0=
226214
k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY=
227215
k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8=
228-
k8s.io/component-base v0.34.1 h1:v7xFgG+ONhytZNFpIz5/kecwD+sUhVE6HU7qQUiRM4A=
229-
k8s.io/component-base v0.34.1/go.mod h1:mknCpLlTSKHzAQJJnnHVKqjxR7gBeHRv0rPXA7gdtQ0=
230216
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
231217
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
232218
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=

test/integration/integration.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,28 @@ import (
1010
"github.com/spf13/cobra"
1111

1212
// Import the test packages
13-
_ "github.com/openshift/lvm-operator/v4/test/integration/sno"
13+
_ "github.com/openshift/lvm-operator/v4/test/integration/qe_tests"
1414
)
1515

1616
func main() {
1717
registry := e.NewRegistry()
1818
ext := e.NewExtension("openshift", "payload", "lvm-operator")
1919

2020
suites := []e.Suite{
21+
// SNO tests only
2122
{
22-
Name: "openshift/lvm-operator/test/integration/single-node",
23+
Name: "openshift/lvm-operator/test/integration/qe_tests/sno",
2324
Qualifiers: []string{
2425
`labels.exists(l, l=="SNO")`,
2526
},
2627
},
28+
// MNO tests only
29+
{
30+
Name: "openshift/lvm-operator/test/integration/qe_tests/mno",
31+
Qualifiers: []string{
32+
`labels.exists(l, l=="MNO")`,
33+
},
34+
},
2735
}
2836

2937
for _, suite := range suites {

0 commit comments

Comments
 (0)