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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail if dirty #16839

Merged
merged 6 commits into from
Sep 25, 2018
Merged

Fail if dirty #16839

merged 6 commits into from
Sep 25, 2018

Conversation

balloob
Copy link
Member

@balloob balloob commented Sep 25, 2018

Description:

Fail the tests if there are untracked files in the git repo after the tests ran.

This means that some tests don't mock I/O correctly.

This test will fail now, and once I finish catching all the offenders, I'll rebase and it will pass 馃憤

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

@homeassistant homeassistant added cla-signed small-pr PRs with less than 30 lines. labels Sep 25, 2018
@ghost ghost assigned balloob Sep 25, 2018
@ghost ghost added the in progress label Sep 25, 2018
@balloob
Copy link
Member Author

balloob commented Sep 25, 2018

@@ -0,0 +1,2 @@
#!/bin/bash
[[ -z $(git ls-files --others --exclude-standard) ]] || { echo; echo '***** ERROR: Tests are leaving files behind. Please update the tests to avoid writing any files.'; echo; exit 1; }
Copy link
Member

@pvizeli pvizeli Sep 25, 2018

Choose a reason for hiding this comment

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

{ echo -e "\n****...\n"; exit 1 };

@balloob balloob merged commit 5a22e7d into dev Sep 25, 2018
@ghost ghost removed the in progress label Sep 25, 2018
@balloob balloob deleted the fail-if-dirty branch September 25, 2018 18:47
@balloob balloob mentioned this pull request Oct 12, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants