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

nit: allow arbitrary folder recursion for e2e tests. #3714

Merged
merged 3 commits into from
Jun 1, 2023

Conversation

DimitrisJim
Copy link
Contributor

Description

Something I noticed in #3710. In addition to that, doesn't seem like 03-connection tests are currently checked during the build step (though their tests are executed afterwards).

closes: #XXXX

Commit Message / Changelog Entry

nit: allow arbitrary folder recursion for e2e tests.

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

@codecov-commenter
Copy link

Codecov Report

Merging #3714 (530bbb7) into main (83e6877) will increase coverage by 0.02%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3714      +/-   ##
==========================================
+ Coverage   78.74%   78.76%   +0.02%     
==========================================
  Files         186      186              
  Lines       12816    12816              
==========================================
+ Hits        10092    10095       +3     
+ Misses       2291     2289       -2     
+ Partials      433      432       -1     

see 1 file with indirect coverage changes

@@ -50,10 +50,11 @@ jobs:
- name: Build e2e
run: |
cd e2e
test_dirs="$(ls -A tests)"
for td in $test_dirs
find ./tests -type d | while IFS= read -r dir
Copy link
Contributor Author

Choose a reason for hiding this comment

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

finds all folders in tests/ and if they contain a .go file, compiles the test binary

Copy link
Member

Choose a reason for hiding this comment

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

So just so I understand this pipe - IFS = input field separator, and its separating on blank/space(?) reading from stdin into var dir which we then use inside the loop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

typically it is used with some separator value if required, setting it to nothing IFS= means it basically won't do any further splitting of the file paths (allowing e.g a path with spaces if one arises). A ref: https://unix.stackexchange.com/a/676870

Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

lgtm 🚀

Copy link
Contributor

@charleenfei charleenfei left a comment

Choose a reason for hiding this comment

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

nice fix!

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

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

LGTM great improvement ❤️

@DimitrisJim DimitrisJim enabled auto-merge (squash) June 1, 2023 10:19
@DimitrisJim DimitrisJim merged commit b20799d into main Jun 1, 2023
@DimitrisJim DimitrisJim deleted the jim/arbitrary-e2e-test-folder-depth branch June 1, 2023 10: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.

5 participants