summaryrefslogtreecommitdiffstats
path: root/qa
diff options
context:
space:
mode:
authorJoris Roovers <joris.roovers@gmail.com>2021-09-27 11:50:38 +0200
committerJoris Roovers <joris.roovers@gmail.com>2021-09-27 13:11:54 +0200
commit27671c575dfba6aecf06d8c01def73f1da23baa2 (patch)
tree3fc2163a39d9bb57cfdc263c6b42e1b5f859bec1 /qa
parent0f59473fcd4e556bea05095b3169bedfc80587e8 (diff)
Add --fail-without-commits CLI option
Not actually functional yet, this commit only introduces the CLI flag. Relates to #193
Diffstat (limited to 'qa')
-rw-r--r--qa/expected/test_config/test_config_from_env_12
-rw-r--r--qa/test_config.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/qa/expected/test_config/test_config_from_env_1 b/qa/expected/test_config/test_config_from_env_1
index e1101fc..d4b1002 100644
--- a/qa/expected/test_config/test_config_from_env_1
+++ b/qa/expected/test_config/test_config_from_env_1
@@ -18,7 +18,7 @@ ignore-squash-commits: True
ignore-revert-commits: True
ignore-stdin: True
staged: False
-fail-without-commits: False
+fail-without-commits: True
verbosity: 2
debug: True
target: {target}
diff --git a/qa/test_config.py b/qa/test_config.py
index 9c00b95..432a2c5 100644
--- a/qa/test_config.py
+++ b/qa/test_config.py
@@ -80,7 +80,8 @@ class ConfigTests(BaseTestCase):
filename = self.create_simple_commit(commit_msg, git_repo=target_repo)
env = self.create_environment({"GITLINT_DEBUG": "1", "GITLINT_VERBOSITY": "2",
"GITLINT_IGNORE": "T1,T2", "GITLINT_CONTRIB": "CC1,CT1",
- "GITLINT_IGNORE_STDIN": "1", "GITLINT_TARGET": target_repo,
+ "GITLINT_FAIL_WITHOUT_COMMITS": "1", "GITLINT_IGNORE_STDIN": "1",
+ "GITLINT_TARGET": target_repo,
"GITLINT_COMMITS": self.get_last_commit_hash(git_repo=target_repo)})
output = gitlint(_env=env, _cwd=self.tmp_git_repo, _tty_in=True, _ok_code=[5])
expected_kwargs = self.get_debug_vars_last_commit(git_repo=target_repo)