Skip to content

Use sqltest.Quick and minor improvements #25

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

Merged
merged 3 commits into from
Apr 27, 2025
Merged

Conversation

henvic
Copy link
Owner

@henvic henvic commented Apr 27, 2025

No description provided.

@henvic henvic requested a review from Copilot April 27, 2025 18:07
Copy link

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the test setup for Postgres and Inventory tests by replacing the verbose sqltest.New and pool.Setup calls with the more concise sqltest.Quick helper and removes unused flag imports. Additionally, the integration workflow has been updated to run tests with a shuffled order.

  • Simplify test setup using sqltest.Quick in Postgres and Inventory tests.
  • Remove unused flag variables.
  • Update workflow to enable test shuffling.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

File Description
internal/postgres/postgres_test.go Replaced manual migration setup with sqltest.Quick and hardcoded Force in one test
internal/inventory/inventory_test.go Removed unused flag variable
internal/inventory/helper_test.go Updated Force parameter to always be true
.github/workflows/integration.yml Added '-shuffle on' to test execution
Files not reviewed (1)
  • go.mod: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/integration.yml:48

  • Ensure that enabling test shuffling does not reveal hidden dependencies between tests. Verify that all tests remain fully independent when run in a shuffled order.
run: go test -v -race -count 1 -shuffle on -covermode atomic -coverprofile=profile.cov ./...

@henvic henvic merged commit 7c5988b into main Apr 27, 2025
10 checks passed
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.

1 participant