Commit 903a9792 authored by Mark Lapierre's avatar Mark Lapierre

Fix push file size test

Don't try to re-create master as a new branch.
Expect a Git error raised when the file it too large.
parent 95cda2cf
...@@ -40,8 +40,8 @@ module QA ...@@ -40,8 +40,8 @@ module QA
set_file_size_limit(1) set_file_size_limit(1)
expect(page).to have_content("Application settings saved successfully") expect(page).to have_content("Application settings saved successfully")
push = push_new_file('oversize_file_2.bin', wait_for_push: false) expect { push_new_file('oversize_file_2.bin', wait_for_push: false) }
expect(push.output).to have_content 'remote: fatal: pack exceeds maximum allowed size' .to raise_error(QA::Git::Repository::RepositoryCommandError, /remote: fatal: pack exceeds maximum allowed size/)
end end
def set_file_size_limit(limit) def set_file_size_limit(limit)
...@@ -65,6 +65,7 @@ module QA ...@@ -65,6 +65,7 @@ module QA
p.file_content = SecureRandom.random_bytes(2000000) p.file_content = SecureRandom.random_bytes(2000000)
p.commit_message = 'Adding a new file' p.commit_message = 'Adding a new file'
p.wait_for_push = wait_for_push p.wait_for_push = wait_for_push
p.new_branch = false
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment