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

Use t.Cleanup to remove temporally directories and set environment variables #343

Merged
merged 4 commits into from
May 8, 2022

Conversation

itchyny
Copy link
Contributor

@itchyny itchyny commented May 8, 2022

This PR suggests migrating test setup cleanup to use t.Cleanup. This PR removes calling teardown returned by setup functions, also refactors environment variable setups. An existing test fails to remove the temporally directory but using t.Cleanup in test utility prevents a mistake like this. Note that gitconfig.WithConfig would be improved by  calling t.Cleanup inside it.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2288166973

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 82.009%

Totals Coverage Status
Change from base Build 2280488901: 0.0%
Covered Lines: 1094
Relevant Lines: 1334

💛 - Coveralls

@Songmu
Copy link
Member

Songmu commented May 8, 2022

It's good practice to be proactive in using new syntax!

@Songmu Songmu merged commit 8f948f2 into master May 8, 2022
@Songmu Songmu deleted the testing-cleanup branch May 8, 2022 05:13
@github-actions github-actions bot mentioned this pull request Feb 22, 2023
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