Skip to content

Commit af98bf6

Browse files
perdasilvaPer Goncalves da Silva
authored andcommitted
Fix e2e test grid by using ginkgo labels (#3451)
* Fix e2e gha num chunks Signed-off-by: Per Goncalves da Silva <[email protected]> * Refactor e2e split tool for labels Signed-off-by: Per Goncalves da Silva <[email protected]> * Add ginkgo labels to e2e tests Signed-off-by: Per Goncalves da Silva <[email protected]> --------- Signed-off-by: Per Goncalves da Silva <[email protected]> Co-authored-by: Per Goncalves da Silva <[email protected]> Upstream-repository: operator-lifecycle-manager Upstream-commit: 77ce6ff415bb7bf95b95a5a973e2a66423c01663
1 parent e1bbc3b commit af98bf6

29 files changed

+143
-204
lines changed

staging/operator-lifecycle-manager/.github/workflows/e2e-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ jobs:
9292
9393
# run non-flakes if matrix-id is not 'flakes'
9494
- name: Run e2e tests
95-
# calculate the number of chunks as the number of parallel jobs minus 1 (flakes job)
95+
# calculate the number of chunks as the number of parallel jobs
9696
# use the split tool to split the test suite into chunks and run the chunk corresponding to the matrix-id
9797
# focus on those tests and skip tests marked as FLAKE
9898
run: |
99-
E2E_TEST_NUM_CHUNKS=$(( ${{ strategy.job-total }} - 1 )) \
100-
GINKGO_OPTS="${GINKGO_OPTS} -focus '$(go run ./test/e2e/split/... -chunks $E2E_TEST_NUM_CHUNKS -print-chunk $E2E_TEST_CHUNK ./test/e2e)' -skip '\[FLAKE\]'" \
99+
E2E_TEST_NUM_CHUNKS=$(( ${{ strategy.job-total }} )) \
100+
GINKGO_OPTS="${GINKGO_OPTS} -label-filter '$(go run ./test/e2e/split/... -chunks $E2E_TEST_NUM_CHUNKS -print-chunk $E2E_TEST_CHUNK ./test/e2e)' -skip '\[FLAKE\]'" \
101101
make e2e;
102102
103103
# archive test results

staging/operator-lifecycle-manager/test/e2e/bundle_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
//go:embed testdata/vpa/crd.yaml
2727
var vpaCRDRaw []byte
2828

29-
var _ = Describe("Installing bundles with new object types", func() {
29+
var _ = Describe("Installing bundles with new object types", Label("ObjectTypes"), func() {
3030
var (
3131
kubeClient operatorclient.ClientInterface
3232
operatorClient versioned.Interface

staging/operator-lifecycle-manager/test/e2e/catalog_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const (
4343
badCSVDir = "bad-csv"
4444
)
4545

46-
var _ = Describe("Starting CatalogSource e2e tests", func() {
46+
var _ = Describe("Starting CatalogSource e2e tests", Label("CatalogSource"), func() {
4747
var (
4848
generatedNamespace corev1.Namespace
4949
c operatorclient.ClientInterface

staging/operator-lifecycle-manager/test/e2e/catalog_exclusion_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
const magicCatalogDir = "magiccatalog"
2222

23-
var _ = Describe("Global Catalog Exclusion", func() {
23+
var _ = Describe("Global Catalog Exclusion", Label("CatalogExclusion"), func() {
2424
var (
2525
generatedNamespace corev1.Namespace
2626
determinedE2eClient *util.DeterminedE2EClient

staging/operator-lifecycle-manager/test/e2e/catsrc_pod_config_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const catalogSourceLabel = "olm.catalogSource"
1818

1919
var _ = By
2020

21-
var _ = Describe("CatalogSource Grpc Pod Config", func() {
21+
var _ = Describe("CatalogSource Grpc Pod Config", Label("CatalogSourcePodConfig"), func() {
2222

2323
var (
2424
generatedNamespace corev1.Namespace

staging/operator-lifecycle-manager/test/e2e/crd_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2323
)
2424

25-
var _ = Describe("CRD Versions", func() {
25+
var _ = Describe("CRD Versions", Label("CRDs"), func() {
2626
var (
2727
generatedNamespace corev1.Namespace
2828
c operatorclient.ClientInterface

staging/operator-lifecycle-manager/test/e2e/csv_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434
"github.com/operator-framework/operator-lifecycle-manager/test/e2e/ctx"
3535
)
3636

37-
var _ = Describe("ClusterServiceVersion", func() {
37+
var _ = Describe("ClusterServiceVersion", Label("ClusterServiceVersion"), func() {
3838
var (
3939
generatedNamespace corev1.Namespace
4040
c operatorclient.ClientInterface

staging/operator-lifecycle-manager/test/e2e/deprecated_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
var missingAPI = `{"apiVersion":"verticalpodautoscalers.autoscaling.k8s.io/v1","kind":"VerticalPodAutoscaler","metadata":{"name":"my.thing","namespace":"foo"}}`
2020

21-
var _ = Describe("Not found APIs", func() {
21+
var _ = Describe("Not found APIs", Label("APIDeprecation"), func() {
2222
var generatedNamespace corev1.Namespace
2323

2424
BeforeEach(func() {

staging/operator-lifecycle-manager/test/e2e/disabling_copied_csv_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const (
2626
protectedCopiedCSVNamespacesRuntimeFlag = "--protectedCopiedCSVNamespaces"
2727
)
2828

29-
var _ = Describe("Disabling copied CSVs", func() {
29+
var _ = Describe("Disabling copied CSVs", Label("DisablingCopiedCSVs"), func() {
3030
var (
3131
generatedNamespace corev1.Namespace
3232
csv operatorsv1alpha1.ClusterServiceVersion

staging/operator-lifecycle-manager/test/e2e/dynamic_resource_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
// This test was disabled because both of its tests are currently being skipped
2121
// We need to understand why and whether this test is even needed:
2222
// https://github.com/operator-framework/operator-lifecycle-manager/issues/3402
23-
var _ = XDescribe("Subscriptions create required objects from Catalogs", func() {
23+
var _ = XDescribe("Subscriptions create required objects from Catalogs", Label("DynamicResource"), func() {
2424
var (
2525
crc versioned.Interface
2626
generatedNamespace corev1.Namespace

0 commit comments

Comments
 (0)