Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

test(git): ensures that global git user settings are not interfering with the tests #638

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 1 commit into from
Dec 19, 2022

Conversation

noirbizarre
Copy link
Member

Description

This PR create a git sanbox to isolated from the host configuration.
As example, in my case given I have a default signin key, without this fix, pre-commit fail trying to prompt for gpg credentials.
This ensure that test are run on a default configuration with user.name and user.email already set and nothing else.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes (N/A)

Expected behavior

Custom git user configuration does not interefere with the test suite anymore

Steps to Test This Pull Request

Run the tests with any change in you git config

Additional context

Submitted on v3 because of the working CI (and it is my current base for the next PRs) but the issue already exists on master

@codecov
Copy link

codecov bot commented Dec 13, 2022

Codecov Report

❗ No coverage uploaded for pull request base (v3@66e4e62). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@          Coverage Diff          @@
##             v3     #638   +/-   ##
=====================================
  Coverage      ?   98.36%           
=====================================
  Files         ?       39           
  Lines         ?     1655           
  Branches      ?        0           
=====================================
  Hits          ?     1628           
  Misses        ?       27           
  Partials      ?        0           
Flag Coverage Δ
unittests 98.36% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

This is a cool one. Thanks! @woile I'll merge it tomorrow. Let me know if you have any though. Thanks!

@Lee-W Lee-W merged commit dc962f3 into commitizen-tools:v3 Dec 19, 2022
@Lee-W
Copy link
Member

Lee-W commented Dec 19, 2022

Sorry for late merging! Just merge it to v3

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.

2 participants