summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2018-07-11 11:22:46 -0700
committerMichael Kozono <mkozono@gmail.com>2018-07-11 11:35:01 -0700
commit2555bf5ee35862a9f940d3004e3b9f7bdf196e12 (patch)
tree850a76df45e60d05ecf6994ebeba77b162b8064d /qa
parentc74e57bb99cd2e6c292e62c313546fb3afc6a881 (diff)
downloadgitlab-ce-2555bf5ee35862a9f940d3004e3b9f7bdf196e12.tar.gz
Revert "Log push output on exception"mk/remove-push-output-logging
This reverts commit d493c91d21250e0b94a14f1808fcf8bb6f1a8d03.
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/specs/features/repository/protected_branches_spec.rb24
1 files changed, 6 insertions, 18 deletions
diff --git a/qa/qa/specs/features/repository/protected_branches_spec.rb b/qa/qa/specs/features/repository/protected_branches_spec.rb
index 29ea2e69ec7..4e593a69aae 100644
--- a/qa/qa/specs/features/repository/protected_branches_spec.rb
+++ b/qa/qa/specs/features/repository/protected_branches_spec.rb
@@ -13,15 +13,11 @@ module QA
Page::Main::Login.act { sign_in_using_credentials }
end
- after do |example|
+ after do
# We need to clear localStorage because we're using it for the dropdown,
# and capybara doesn't do this for us.
# https://github.com/teamcapybara/capybara/issues/1702
Capybara.execute_script 'localStorage.clear()'
-
- # In order to help diagnose a false failure
- # https://gitlab.com/gitlab-org/gitlab-ce/issues/48241
- log_push_output if example.exception
end
context 'when developers and maintainers are allowed to push to a protected branch' do
@@ -31,9 +27,9 @@ module QA
expect(protected_branch.name).to have_content(branch_name)
expect(protected_branch.push_allowance).to have_content('Developers + Maintainers')
- @push = push_new_file(branch_name)
+ push = push_new_file(branch_name)
- expect(@push.output).to match(/remote: To create a merge request for protected-branch, visit/)
+ expect(push.output).to match(/remote: To create a merge request for protected-branch, visit/)
end
end
@@ -41,11 +37,11 @@ module QA
it 'user without push rights fails to push to the protected branch' do
create_protected_branch(allow_to_push: false)
- @push = push_new_file(branch_name)
+ push = push_new_file(branch_name)
- expect(@push.output)
+ expect(push.output)
.to match(/remote\: GitLab\: You are not allowed to push code to protected branches on this project/)
- expect(@push.output)
+ expect(push.output)
.to match(/\[remote rejected\] #{branch_name} -> #{branch_name} \(pre-receive hook declined\)/)
end
end
@@ -69,13 +65,5 @@ module QA
resource.new_branch = false
end
end
-
- def log_push_output
- if defined?(@push)
- filename = File.join('tmp', "push-output-#{project.name}")
- puts "Exception detected. Push output will be saved to #{filename}"
- IO.binwrite(filename, @push.output)
- end
- end
end
end