forked from cloudnative-pg/cloudnative-pg
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: improve unit tests and add race condition detection (cloudnativ…
…e-pg#5936) * Added `make test-race` target to the Makefile to enable running tests with the Go race detector. This helps catch potential concurrency issues. * Added the missing `RunSpec` invocation in the `internal/cmd/manager/instance/run` package. * Marked relevant test suites with the `Ordered` modifier to ensure proper execution order for dependent tests. * Moved shared variables initialization in a `BeforeEach` block. * Avoided disrupting the formatting of the test output by ensuring there was no output to stdout during the tests. * Renamed some imported packages to improve code clarity and readability. * Removed empty and unused test suites. * Improved test suite setup and teardown with `DeferCleanup()` to handle cleanup operations consistently and avoid manual `AfterSuite` calls. * Used `SpecContext` injected parameter instead of `context.TODO()` when a context is needed. * Applied various style fixes for consistency and code quality. Signed-off-by: Marco Nenciarini <[email protected]> Signed-off-by: Marco Nenciarini <[email protected]> Signed-off-by: Jaime Silvela <[email protected]> Co-authored-by: Jaime Silvela <[email protected]>
- Loading branch information
Showing
32 changed files
with
160 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.