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

GitTasksTest::testGitPreCommitHook() is destructive #819

Closed
TravisCarden opened this issue Dec 20, 2016 · 2 comments
Closed

GitTasksTest::testGitPreCommitHook() is destructive #819

TravisCarden opened this issue Dec 20, 2016 · 2 comments
Assignees
Labels
Bug Something isn't working

Comments

@TravisCarden
Copy link
Contributor

Unit tests should be absolutely idempotent and non-destructive. But currently \Acquia\Blt\Tests\BltProject\GitTasksTest::testGitPreCommitHook() rewrites Git history. This isn't a problem in a CI context, but if you ever run your unit tests locally during development, you'll be surprised when your HEAD commit disappears.

@grasmash grasmash added the Bug Something isn't working label Dec 20, 2016
@grasmash
Copy link
Contributor

Yes.

@grasmash
Copy link
Contributor

@TravisCarden I may just remove the test. I'm not aware of any way to simulate this behavior. https://github.com/acquia/blt/blob/8.x/tests/phpunit/BltProject/GitTest.php#L74

grasmash added a commit to grasmash/bolt that referenced this issue Dec 21, 2016
@grasmash grasmash self-assigned this Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants