Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: Delineate between unit and integration tests #399

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

chrisseto
Copy link
Contributor

This commit blocks the k3d package from being used unless the integration or acceptance build tags have been provided. The primary goal of which is to reduce the total iteration time for running unit tests.

Additionally, this commit makes the test name assertions of the SkipIfNot{Integration,Acceptance} helpers run regardless of build tags to ensure consistent naming across the codebase.

@chrisseto
Copy link
Contributor Author

The slowest test when running task test:unit is ~30s in the redpanda controllers package. Massive improvement IMO.

@chrisseto chrisseto force-pushed the chris/p/all-integration branch from 9544d69 to 988d65a Compare January 16, 2025 16:50
@chrisseto chrisseto force-pushed the chris/p/all-integration branch from 988d65a to b2cbc26 Compare January 16, 2025 19:10
This commit blocks the k3d package from being used unless the `integration` or
`acceptance` build tags have been provided. The primary goal of which is to
reduce the total iteration time for running unit tests.

Additionally, this commit makes the test name assertions of the
`SkipIfNot{Integration,Acceptance}` helpers run regardless of build tags to
ensure consistent naming across the codebase.
@chrisseto chrisseto force-pushed the chris/p/all-integration branch from b2cbc26 to c8af6ec Compare January 16, 2025 21:46
@RafalKorepta
Copy link
Contributor

I think schema should have Prometheus and Cert-Manager CRDs added as per

redpanda_controller.go:709: "level"=0 "msg"="Skipping unknown GVK" "controller"="redpanda" "controllerGroup"="cluster.redpanda.com" "controllerKind"="Redpanda" "Redpanda"={"name"="rp-b3x99m" "namespace"="testenv-9z9pt"} "namespace"="testenv-9z9pt" "name"="rp-b3x99m" "reconcileID"="8e576e8c-dfa4-42b1-bbf7-e0529f9f0cc9" "gvk"="*v1.PodMonitorList"
redpanda_controller.go:709: "level"=0 "msg"="Skipping unknown GVK" "controller"="redpanda" "controllerGroup"="cluster.redpanda.com" "controllerKind"="Redpanda" "Redpanda"={"name"="rp-b3x99m" "namespace"="testenv-9z9pt"} "namespace"="testenv-9z9pt" "name"="rp-b3x99m" "reconcileID"="8e576e8c-dfa4-42b1-bbf7-e0529f9f0cc9" "gvk"="*v1.ServiceMonitorList"

https://buildkite.com/redpanda/redpanda-operator/builds/4082#01947119-fe4a-4a19-b7e3-a7e3e0575d7b/232-1239

@RafalKorepta
Copy link
Contributor

Interesting that 2 tests reported that generation ID was changed by something ...

--
  | redpanda_controller_test.go:684:
  | Error Trace:	/work/operator/internal/controller/redpanda/redpanda_controller_test.go:684
  | /work/operator/internal/controller/redpanda/redpanda_controller_test.go:1045
  | /work/operator/internal/controller/redpanda/redpanda_controller_test.go:705
  | Error:      	Not equal:
  | expected: 1
  | actual  : 2
  | Test:       	TestIntegrationRedpandaController/TestIntegrationStableUIDAndGeneration
  | Messages:   	*v1.StatefulSet "rp-tmpvwu"'s Generation changed (Something changed .Spec)

https://buildkite.com/redpanda/redpanda-operator/builds/4082#01947119-fe4a-4a19-b7e3-a7e3e0575d7b/232-826

--
  | redpanda_controller_test.go:684:
  | Error Trace:	/work/operator/internal/controller/redpanda/redpanda_controller_test.go:684
  | /work/operator/internal/controller/redpanda/redpanda_controller_test.go:1045
  | /work/operator/internal/controller/redpanda/redpanda_controller_test.go:705
  | Error:      	Not equal:
  | expected: 1
  | actual  : 2
  | Test:       	TestIntegrationRedpandaController/TestIntegrationStableUIDAndGeneration
  | Messages:   	*v1.StatefulSet "rp-b3x99m"'s Generation changed (Something changed .Spec)

https://buildkite.com/redpanda/redpanda-operator/builds/4082#01947119-fe4a-4a19-b7e3-a7e3e0575d7b/232-850

@RafalKorepta
Copy link
Contributor

Another problem with the name length

===
--
  | \| FATA[0000] Failed Cluster Configuration Validation:  provided cluster name 'testintegrationclientfactorytlslisteners' does not match requirements: Cluster name must be <= 32 characters, but has 40
  | Wraps: (3) exit status 1

https://buildkite.com/redpanda/redpanda-operator/builds/4082#01947119-fe4a-4a19-b7e3-a7e3e0575d7b/232-2110

@chrisseto
Copy link
Contributor Author

I'm going to go ahead and merge this rather than trying to fix all the integration issues as those tests we're just not being run previously and they don't currently block merged.

@chrisseto chrisseto merged commit 343a6d8 into main Jan 17, 2025
7 of 8 checks passed
@chrisseto chrisseto deleted the chris/p/all-integration branch January 17, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants