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

BATS infra refactor #2031

Merged
merged 23 commits into from
Mar 4, 2022
Merged

BATS infra refactor #2031

merged 23 commits into from
Mar 4, 2022

Conversation

gaelicWizard
Copy link
Contributor

@gaelicWizard gaelicWizard commented Jan 11, 2022

Description

  • Apply recommendations from BATS documentation to the boilerplate in the test files,
  • refactor large parts of test_helper.bash,
  • use git worktree for a fast, reliable, and predictable test environment,
  • remove dependency on test_make,
  • make working tree stand up per-file, rather than per-test, so it's much faster,
  • standardize test fixture staging,
  • don't ever access my local $HOME or local $BASH_IT,
  • update bats-core to tag v1.5.0.

I believe this closes #1821.

Motivation and Context

This is chapter 2 of my last BATS patch. This time I understand BATS slightly better!

I disabled intra-file parallelization, but this can be reverted as soon as configuration is no longer inside the repo.

This alsö should resolve the drive behind #1753, as the test environment is now separated from the live repository.

How Has This Been Tested?

Lots and lots of running test/run...

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

@gaelicWizard gaelicWizard force-pushed the bats-cleanup branch 5 times, most recently from 7c897ff to df2362f Compare January 11, 2022 08:15
@gaelicWizard gaelicWizard changed the title Bats cleanup BATS infra consolidation Jan 11, 2022
@gaelicWizard gaelicWizard force-pushed the bats-cleanup branch 2 times, most recently from b86c32a to 0b03ee2 Compare January 11, 2022 23:11
@gaelicWizard gaelicWizard changed the title BATS infra consolidation BATS infra refactor Jan 11, 2022
@gaelicWizard gaelicWizard force-pushed the bats-cleanup branch 21 times, most recently from 3e58a5f to 86af804 Compare January 12, 2022 04:41
@gaelicWizard
Copy link
Contributor Author

@NoahGorny, I didn't realize #2061 was already merged! Rebased on master (with no conflicts) and ready to roll 😃

Copy link
Member

@NoahGorny NoahGorny left a comment

Choose a reason for hiding this comment

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

Let's merge this

@gaelicWizard gaelicWizard merged commit ca8101b into Bash-it:master Mar 4, 2022
@gaelicWizard gaelicWizard deleted the bats-cleanup branch March 4, 2022 19:25
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.

Tests loading custom files
2 participants