From 2249b3a1defa1c837aa1e46490e2b293977b6527 Mon Sep 17 00:00:00 2001 From: Adam Zethraeus Date: Fri, 10 Jun 2022 00:11:18 -0700 Subject: [PATCH] update test for behavior configuring lfs careveout --- tests/check_added_large_files_test.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/check_added_large_files_test.py b/tests/check_added_large_files_test.py index 54c4e68..81f9561 100644 --- a/tests/check_added_large_files_test.py +++ b/tests/check_added_large_files_test.py @@ -96,6 +96,16 @@ def test_allows_gitlfs(temp_git_dir): # pragma: no cover # Should succeed assert main(('--maxkb', '9', 'f.py')) == 0 +@xfailif_no_gitlfs +def test_disallows_gitlfs_when_specified(temp_git_dir): # pragma: no cover + with temp_git_dir.as_cwd(): + cmd_output('git', 'lfs', 'install', '--local') + temp_git_dir.join('f.py').write('a' * 10000) + cmd_output('git', 'lfs', 'track', 'f.py') + cmd_output('git', 'add', '--', '.') + # Should reject file + assert main(('--maxkb', '9', '--allow-in-lfs', 'false', 'f.py')) == 1 + @xfailif_no_gitlfs def test_moves_with_gitlfs(temp_git_dir): # pragma: no cover