summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2019-02-01 16:57:26 -0500
committerMark Lapierre <mlapierre@gitlab.com>2019-02-08 10:44:00 -0500
commit47bf98316dc7ee57053998ce3039e00517991af6 (patch)
tree75d0da6aa769a5d0551676d835d7d3c6423bd2e9
parentf9f223c68e65e0517e7f53639210de148b8208d5 (diff)
downloadgitlab-ce-qa-improve-wait-for-push.tar.gz
Update file size specqa-improve-wait-for-push
Don't wait for push when the push is expected to fail.
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb
index 23ea55c2e61..7d96da32423 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb
@@ -31,7 +31,7 @@ module QA
set_file_size_limit(5)
expect(page).to have_content("Application settings saved successfully")
- push = push_new_file('oversize_file_1.bin')
+ push = push_new_file('oversize_file_1.bin', wait_for_push: true)
expect(push.output).not_to have_content 'remote: fatal: pack exceeds maximum allowed size'
end
@@ -39,7 +39,7 @@ module QA
set_file_size_limit(1)
expect(page).to have_content("Application settings saved successfully")
- push = push_new_file('oversize_file_2.bin')
+ push = push_new_file('oversize_file_2.bin', wait_for_push: false)
expect(push.output).to have_content 'remote: fatal: pack exceeds maximum allowed size'
end
@@ -55,7 +55,7 @@ module QA
end
end
- def push_new_file(file_name)
+ def push_new_file(file_name, wait_for_push: true)
@project.visit!
Resource::Repository::ProjectPush.fabricate! do |p|
@@ -63,6 +63,7 @@ module QA
p.file_name = file_name
p.file_content = SecureRandom.random_bytes(2000000)
p.commit_message = 'Adding a new file'
+ p.wait_for_push = wait_for_push
end
end
end