Skip to content
Snippets Groups Projects
Commit afe2b984 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 5a6b36b6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -172,5 +172,47 @@ describe Ci::FindExposedArtifactsService do
])
end
end
context 'cross-project MR' do
let!(:foreign_project) { create(:project) }
let!(:pipeline) { create(:ci_pipeline, project: foreign_project) }
let!(:job_show) do
create_job_with_artifacts({
artifacts: {
expose_as: 'file artifact',
paths: ['ci_artifacts.txt']
}
})
end
let!(:job_browse) do
create_job_with_artifacts({
artifacts: {
expose_as: 'directory artifact',
paths: ['tests_encoding/']
}
})
end
subject { described_class.new(project, user).for_pipeline(pipeline, limit: 2) }
it 'returns the correct path for cross-project MRs' do
expect(subject).to eq([
{
text: 'file artifact',
url: file_project_job_artifacts_path(foreign_project, job_show, 'ci_artifacts.txt'),
job_name: job_show.name,
job_path: project_job_path(foreign_project, job_show)
},
{
text: 'directory artifact',
url: browse_project_job_artifacts_path(foreign_project, job_browse),
job_name: job_browse.name,
job_path: project_job_path(foreign_project, job_browse)
}
])
end
end
end
end
Loading
Loading
@@ -49,7 +49,7 @@ describe Deployments::AfterCreateService do
it 'creates ref' do
expect_any_instance_of(Repository)
.to receive(:create_ref)
.with(deployment.sha, deployment.send(:ref_path))
.with(deployment.sha, "refs/environments/production/deployments/#{deployment.iid}")
 
service.execute
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment