Skip to content

Commit 54032cd

Browse files
committed
test: parallel execution of e2e tests
1 parent 188b19a commit 54032cd

File tree

16 files changed

+83
-11
lines changed

16 files changed

+83
-11
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ test: manifests generate fmt vet envtest ## Run tests.
136136
# Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
137137
.PHONY: test-e2e # Run the e2e tests against a Kind k8s instance that is spun up.
138138
test-e2e: generate
139-
go test -p 1 ./test/e2e/... -tags=integration -timeout 20m
139+
go test ./test/e2e/... -tags=integration -timeout 20m
140140

141141
# Switch images from `registry.redhat.io` images to the dev images
142142
.PHONY: dev-images

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/securesign/operator
33
go 1.23.6
44

55
require (
6+
github.com/alexflint/go-filemutex v1.3.0
67
github.com/blang/semver/v4 v4.0.0
78
github.com/go-logr/logr v1.4.3
89
github.com/google/certificate-transparency-go v1.3.1

go.sum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/alexflint/go-filemutex v1.3.0 h1:LgE+nTUWnQCyRKbpoceKZsPQbs84LivvgwUymZXdOcM=
2+
github.com/alexflint/go-filemutex v1.3.0/go.mod h1:U0+VA/i30mGBlLCrFPGtTe9y6wGQfNAWPBTekHQ+c8A=
13
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
24
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
35
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -134,6 +136,7 @@ github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
134136
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
135137
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
136138
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
139+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
137140
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
138141
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
139142
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
@@ -173,6 +176,7 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
173176
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
174177
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
175178
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
179+
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
176180
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
177181
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
178182
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
@@ -204,6 +208,7 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP
204208
gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
205209
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
206210
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
211+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
207212
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
208213
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
209214
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
File renamed without changes.

test/e2e/byodb_test.go renamed to test/e2e/byo/database_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//go:build integration
22

3-
package e2e
3+
package byo
44

55
import (
66
"context"

test/e2e/provided_certs_test.go renamed to test/e2e/byo/provided_certs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//go:build integration
22

3-
package e2e
3+
package byo
44

55
import (
66
"context"

test/e2e/byo/suite_test.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//go:build integration
2+
3+
package byo
4+
5+
import (
6+
"testing"
7+
"time"
8+
9+
. "github.com/onsi/ginkgo/v2"
10+
. "github.com/onsi/gomega"
11+
"github.com/onsi/gomega/format"
12+
"sigs.k8s.io/controller-runtime/pkg/log"
13+
)
14+
15+
func TestE2e(t *testing.T) {
16+
RegisterFailHandler(Fail)
17+
log.SetLogger(GinkgoLogr)
18+
SetDefaultEventuallyTimeout(time.Duration(3) * time.Minute)
19+
RunSpecs(t, "Bring your own")
20+
21+
// print whole stack in case of failure
22+
format.MaxLength = 0
23+
}

test/e2e/custom_install/proxy.go renamed to test/e2e/custom_install/proxy_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var noProxy = []string{
4444
"localhost",
4545
}
4646

47-
var _ = Describe("Securesign install in proxy-env", Ordered, func() {
47+
var _ = Describe("Install operator in proxy-env", Ordered, func() {
4848
cli, _ := support.CreateClient()
4949
ctx := context.TODO()
5050

test/e2e/custom_install/custom_install_suite_test.go renamed to test/e2e/custom_install/suite_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build custom_install
2+
13
package custom_install
24

35
import (

test/e2e/common_install_test.go renamed to test/e2e/deployment/common_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//go:build integration
22

3-
package e2e
3+
package deployment
44

55
import (
66
"context"
@@ -32,7 +32,7 @@ import (
3232
"k8s.io/apimachinery/pkg/types"
3333
)
3434

35-
var _ = Describe("Securesign install with certificate generation", Ordered, func() {
35+
var _ = Describe("Install with generated certs and keys", Ordered, func() {
3636
cli, _ := support.CreateClient()
3737
ctx := context.TODO()
3838

0 commit comments

Comments
 (0)