From 40ddc1b3810767ee59190f73c891ef75b21b0fa9 Mon Sep 17 00:00:00 2001 From: Kirill Sibirev Date: Thu, 9 Jan 2025 18:29:13 +0100 Subject: [PATCH] Fix ginkgo filter tests in GHA (#415) --- ...{pr_test_e2e_extra.yaml => pr_test_e2e_other.yaml} | 2 +- .github/workflows/pr_test_e2e_selector.yaml | 11 +++++++++++ Makefile | 3 --- test/e2e/ytsaurus_controller_test.go | 10 +++++----- 4 files changed, 17 insertions(+), 9 deletions(-) rename .github/workflows/{pr_test_e2e_extra.yaml => pr_test_e2e_other.yaml} (81%) create mode 100644 .github/workflows/pr_test_e2e_selector.yaml diff --git a/.github/workflows/pr_test_e2e_extra.yaml b/.github/workflows/pr_test_e2e_other.yaml similarity index 81% rename from .github/workflows/pr_test_e2e_extra.yaml rename to .github/workflows/pr_test_e2e_other.yaml index c9fb98e2..53c14dd2 100644 --- a/.github/workflows/pr_test_e2e_extra.yaml +++ b/.github/workflows/pr_test_e2e_other.yaml @@ -8,4 +8,4 @@ jobs: name: Run e2e tests for extra scenarios uses: ./.github/workflows/subflow_run_e2e_tests.yaml with: - e2e_filter: "!basic" + e2e_filter: "!basic && !selector" diff --git a/.github/workflows/pr_test_e2e_selector.yaml b/.github/workflows/pr_test_e2e_selector.yaml new file mode 100644 index 00000000..76c35f8a --- /dev/null +++ b/.github/workflows/pr_test_e2e_selector.yaml @@ -0,0 +1,11 @@ +name: Run selector e2e tests + +on: + pull_request: + +jobs: + check: + name: Run e2e tests for update selector scenarios + uses: ./.github/workflows/subflow_run_e2e_tests.yaml + with: + e2e_filter: "selector" diff --git a/Makefile b/Makefile index c279cd02..ad0e606b 100644 --- a/Makefile +++ b/Makefile @@ -68,9 +68,6 @@ DEBUG = ## Tests parallelism. GINKGO_PROCS ?= 2 -## Filter tests by labels. -GINKGO_LABEL_FILTER = - GINKGO_FLAGS += --vv GINKGO_FLAGS += --trace GINKGO_FLAGS += --procs="$(GINKGO_PROCS)" diff --git a/test/e2e/ytsaurus_controller_test.go b/test/e2e/ytsaurus_controller_test.go index e6201302..8e5767e7 100644 --- a/test/e2e/ytsaurus_controller_test.go +++ b/test/e2e/ytsaurus_controller_test.go @@ -298,7 +298,7 @@ var _ = Describe("Basic e2e test for Ytsaurus controller", Label("e2e"), func() }) }, Entry("When update Ytsaurus within same major version", Label("basic"), testutil.CoreImageSecond), - Entry("When update Ytsaurus to the next major version", testutil.CoreImageNextVer), + Entry("When update Ytsaurus to the next major version", Label("basic"), testutil.CoreImageNextVer), ) Context("Test UpdateSelector", Label("selector"), func() { @@ -376,7 +376,7 @@ var _ = Describe("Basic e2e test for Ytsaurus controller", Label("e2e"), func() Expect(pods.Updated).To(ConsistOf("tnd-0", "tnd-1", "tnd-2"), "updated") }) - It("Should be updated according to UpdateSelector=MasterOnly,StatelessOnly", Label("basic"), func(ctx context.Context) { + It("Should be updated according to UpdateSelector=MasterOnly,StatelessOnly", func(ctx context.Context) { By("Run cluster update with selector:MasterOnly") ytsaurus.Spec.UpdateSelector = ytv1.UpdateSelectorMasterOnly @@ -592,7 +592,7 @@ var _ = Describe("Basic e2e test for Ytsaurus controller", Label("e2e"), func() ytsaurus = testutil.WithQueryTracker(ytsaurus) }) - It("Should run with query tracker and check that query tracker rpc address set up correctly", Label("basic"), func(ctx context.Context) { + It("Should run with query tracker and check that query tracker rpc address set up correctly", func(ctx context.Context) { By("Check that query tracker channel exists in cluster_connection") Expect(ytClient.NodeExists(ctx, ypath.Path("//sys/@cluster_connection/query_tracker/stages/production/channel"), nil)).Should(BeTrue()) }) @@ -605,7 +605,7 @@ var _ = Describe("Basic e2e test for Ytsaurus controller", Label("e2e"), func() ytsaurus = testutil.WithYqlAgent(ytsaurus) }) - It("Should run with yql agent and check that yql agent channel options set up correctly", Label("basic"), func(ctx context.Context) { + It("Should run with yql agent and check that yql agent channel options set up correctly", func(ctx context.Context) { By("Creating ytsaurus client") ytClient := createYtsaurusClient(ytsaurus, namespace) @@ -624,7 +624,7 @@ var _ = Describe("Basic e2e test for Ytsaurus controller", Label("e2e"), func() ytsaurus = testutil.WithQueueAgent(ytsaurus) }) - It("Should run with query tracker and check that access control objects set up correctly", Label("basic"), func(ctx context.Context) { + It("Should run with query tracker and check that access control objects set up correctly", func(ctx context.Context) { By("Check that access control object namespace 'queries' exists") Expect(ytClient.NodeExists(ctx, ypath.Path("//sys/access_control_object_namespaces/queries"), nil)).Should(BeTrue())