Commit 6391eeec authored by David H. Wilkins's avatar David H. Wilkins

git-user-related local test failures

Some of the tests fail locally due to the git user being different
than it is on the test runners.   I'd really like to be able to run
all of the tests locally.
parent bce8b66d
...@@ -478,7 +478,7 @@ describe ProjectsHelper do ...@@ -478,7 +478,7 @@ describe ProjectsHelper do
it 'returns the command to push to create project over SSH' do it 'returns the command to push to create project over SSH' do
allow(Gitlab::CurrentSettings.current_application_settings).to receive(:enabled_git_access_protocol) { 'ssh' } allow(Gitlab::CurrentSettings.current_application_settings).to receive(:enabled_git_access_protocol) { 'ssh' }
expect(helper.push_to_create_project_command(user)).to eq('git push --set-upstream git@localhost:john/$(git rev-parse --show-toplevel | xargs basename).git $(git rev-parse --abbrev-ref HEAD)') expect(helper.push_to_create_project_command(user)).to eq("git push --set-upstream #{Gitlab.config.gitlab.user}@localhost:john/$(git rev-parse --show-toplevel | xargs basename).git $(git rev-parse --abbrev-ref HEAD)")
end end
end end
......
...@@ -202,7 +202,7 @@ describe Gitlab::Middleware::Go do ...@@ -202,7 +202,7 @@ describe Gitlab::Middleware::Go do
def expect_response_with_path(response, protocol, path) def expect_response_with_path(response, protocol, path)
repository_url = case protocol repository_url = case protocol
when :ssh when :ssh
"ssh://git@#{Gitlab.config.gitlab.host}/#{path}.git" "ssh://#{Gitlab.config.gitlab.user}@#{Gitlab.config.gitlab.host}/#{path}.git"
when :http, nil when :http, nil
"http://#{Gitlab.config.gitlab.host}/#{path}.git" "http://#{Gitlab.config.gitlab.host}/#{path}.git"
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