Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-21 18:09:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-21 18:09:05 +0300
commitcf6a3e7ed4cb10a3e9fcbda810601387afc8b8d6 (patch)
treebda3707e95a53cb225793fded61d5073950b0b68 /qa
parent2a040e2655fe0a99df61ad0a7bd0c27e68af0c38 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/git/repository.rb2
-rw-r--r--qa/spec/git/repository_spec.rb8
2 files changed, 6 insertions, 4 deletions
diff --git a/qa/qa/git/repository.rb b/qa/qa/git/repository.rb
index f56fab63198..771f135a95c 100644
--- a/qa/qa/git/repository.rb
+++ b/qa/qa/git/repository.rb
@@ -165,7 +165,7 @@ module QA
# ls-remote is one command known to respond to Git protocol v2 so we use
# it to get output including the version reported via Git tracing
output = run("git ls-remote #{uri}", "GIT_TRACE_PACKET=1")
- output[/git< version (\d+)/, 1] || 'unknown'
+ output.response[/git< version (\d+)/, 1] || 'unknown'
end
def try_add_credentials_to_netrc
diff --git a/qa/spec/git/repository_spec.rb b/qa/spec/git/repository_spec.rb
index 5198eb6f58b..6cca9f55e11 100644
--- a/qa/spec/git/repository_spec.rb
+++ b/qa/spec/git/repository_spec.rb
@@ -69,18 +69,20 @@ describe QA::Git::Repository do
end
describe '#fetch_supported_git_protocol' do
+ Result = Struct.new(:response)
+
it "reports the detected version" do
- expect(repository).to receive(:run).and_return("packet: git< version 2")
+ expect(repository).to receive(:run).and_return(Result.new("packet: git< version 2"))
expect(repository.fetch_supported_git_protocol).to eq('2')
end
it 'reports unknown if version is unknown' do
- expect(repository).to receive(:run).and_return("packet: git< version -1")
+ expect(repository).to receive(:run).and_return(Result.new("packet: git< version -1"))
expect(repository.fetch_supported_git_protocol).to eq('unknown')
end
it 'reports unknown if content does not identify a version' do
- expect(repository).to receive(:run).and_return("foo")
+ expect(repository).to receive(:run).and_return(Result.new("foo"))
expect(repository.fetch_supported_git_protocol).to eq('unknown')
end
end