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

CLOUDP-192976: Unit test everything but int and e2e #1075

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

josvazg
Copy link
Collaborator

@josvazg josvazg commented Aug 9, 2023

This is an alternative to #1068 avoiding the use of build tags to achieve the same main goal.

It is a simpler change and we keep the project build tag free using explicit env vars to activate the int and e2e tests instead.

Uses 2 tricks:

  • Use go list ./... and remove the test/int and test/e2e tests from the unit test set explicitly.
  • Allow go test ./... to run unmolested by requiring a env var to explicitly enable the int or e2e tests.
    • Doing AKO_INT_TEST=1 enables int tests.
    • AKO_E2E_TEST=1 enables e2e tests.

All Submissions:

  • Have you signed our CLA?
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if there is one).
  • Update docs/release-notes/release-notes.md if your changes should be included in the release notes for the next release.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

@josvazg
Copy link
Collaborator Author

josvazg commented Aug 9, 2023

I might send an update for this, I think we can even get go test ./... to work by skipping the e2e and int test unless they are passed some env var.

@josvazg josvazg marked this pull request as draft August 9, 2023 09:55
@josvazg
Copy link
Collaborator Author

josvazg commented Aug 9, 2023

Note if we take this route I need to make some changes to the wording at #1066

@josvazg josvazg force-pushed the CLOUDP-192976/test-filter-folders branch 2 times, most recently from 3e541df to 13073b8 Compare August 9, 2023 10:26
@josvazg josvazg marked this pull request as ready for review August 9, 2023 10:39
@josvazg josvazg force-pushed the CLOUDP-192976/test-filter-folders branch from 13073b8 to a7511f1 Compare August 9, 2023 14:13
Makefile Outdated Show resolved Hide resolved
@josvazg josvazg force-pushed the CLOUDP-192976/test-filter-folders branch from a7511f1 to 2c5fabf Compare August 10, 2023 15:24
@josvazg josvazg marked this pull request as draft August 10, 2023 16:11
@josvazg
Copy link
Collaborator Author

josvazg commented Aug 10, 2023

Will wait for #1079 and rebase after it lands

Signed-off-by: Jose Vazquez <jose.vazquez@mongodb.com>
@josvazg josvazg force-pushed the CLOUDP-192976/test-filter-folders branch from 2c5fabf to 9e15097 Compare August 10, 2023 17:19
@josvazg josvazg marked this pull request as ready for review August 10, 2023 17:22
Copy link
Collaborator

@igor-karpukhin igor-karpukhin left a comment

Choose a reason for hiding this comment

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

Looks good in general 👍 One nit regarding ENV variables verification

test/helper/enable.go Show resolved Hide resolved
@josvazg josvazg merged commit 77efe10 into main Aug 11, 2023
39 checks passed
@josvazg josvazg deleted the CLOUDP-192976/test-filter-folders branch August 11, 2023 09:09
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.

3 participants