Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants