Commit c756b66b authored by 🤖 GitLab Bot 🤖's avatar 🤖 GitLab Bot 🤖

Merge branch 'ce-to-ee-2018-11-09' into 'master'

CE upstream - 2018-11-09 14:21 UTC

See merge request gitlab-org/gitlab-ee!8382
parents 9572631f 2dbf19e7
......@@ -151,12 +151,6 @@ class WikiPage
last_version&.sha
end
# Returns the Date that this latest version was
# created on.
def created_at
@page.version.date
end
# Returns boolean True or False if this instance
# is an old version of the page.
def historical?
......
# frozen_string_literal: true
module QA
context 'Create' do
describe 'Push over HTTP using Git protocol version 2', :requires_git_protocol_v2 do
it 'user pushes to the repository' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
# Create a project to push to
project = Resource::Project.fabricate! do |project|
project.name = 'git-protocol-project'
end
file_name = 'README.md'
file_content = 'Test Git protocol v2'
git_protocol = '2'
git_protocol_reported = nil
# Use Git to clone the project, push a file to it, and then check the
# supported Git protocol
Git::Repository.perform do |repository|
username = 'GitLab QA'
email = 'root@gitlab.com'
repository.uri = project.repository_http_location.uri
repository.use_default_credentials
repository.clone
repository.configure_identity(username, email)
git_protocol_reported = repository.push_with_git_protocol(
git_protocol,
file_name,
file_content)
end
project.visit!
Page::Project::Show.perform(&:wait_for_push)
# Check that the push worked
expect(page).to have_content(file_name)
expect(page).to have_content(file_content)
# And check that the correct Git protocol was used
expect(git_protocol_reported).to eq(git_protocol)
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