summaryrefslogtreecommitdiff
path: root/qa/spec/git
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-10-16 11:38:57 +0200
committerRémy Coutable <remy@rymai.me>2018-10-22 10:03:11 +0200
commite5f01cc8a170f07a1fe623a05ccb1de020b7ea87 (patch)
treeaf6ebc4b616be96df165098bbb9a131e69f7bffb /qa/spec/git
parentfbb0f71237fca77746e84ba4cea837472a178f4d (diff)
downloadgitlab-ce-e5f01cc8a170f07a1fe623a05ccb1de020b7ea87.tar.gz
[QA] Port recent changes from EEqa-backport-recent-ee-changes
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'qa/spec/git')
-rw-r--r--qa/spec/git/repository_spec.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/qa/spec/git/repository_spec.rb b/qa/spec/git/repository_spec.rb
index 53bff3bf0b3..c629f802aa4 100644
--- a/qa/spec/git/repository_spec.rb
+++ b/qa/spec/git/repository_spec.rb
@@ -1,17 +1,18 @@
describe QA::Git::Repository do
+ include Support::StubENV
+
let(:repository) { described_class.new }
before do
+ stub_env('GITLAB_USERNAME', 'root')
cd_empty_temp_directory
set_bad_uri
repository.use_default_credentials
end
describe '#clone' do
- it 'redacts credentials from the URI in output' do
- output, _ = repository.clone
-
- expect(output).to include("fatal: unable to access 'http://****@foo/bar.git/'")
+ it 'is unable to resolve host' do
+ expect(repository.clone).to include("fatal: unable to access 'http://root@foo/bar.git/'")
end
end
@@ -20,10 +21,8 @@ describe QA::Git::Repository do
`git init` # need a repo to push from
end
- it 'redacts credentials from the URI in output' do
- output, _ = repository.push_changes
-
- expect(output).to include("error: failed to push some refs to 'http://****@foo/bar.git'")
+ it 'fails to push changes' do
+ expect(repository.push_changes).to include("error: failed to push some refs to 'http://root@foo/bar.git'")
end
end