Commit 7e74e647 authored by Allison Browne's avatar Allison Browne

Namespace existing Ci::CreateJobArtifactsService

Namespace Ci::CreateJobArtifactsService as
Ci::JobArtifacts::CreateService
parent f900f184
# frozen_string_literal: true
module Ci
class CreateJobArtifactsService < ::BaseService
class JobArtifacts::CreateService < ::BaseService
include Gitlab::Utils::UsageData
ArtifactsExistError = Class.new(StandardError)
......
......@@ -245,7 +245,7 @@ module API
job = authenticate_job!
result = ::Ci::CreateJobArtifactsService.new(job).authorize(artifact_type: params[:artifact_type], filesize: params[:filesize])
result = ::Ci::JobArtifacts::CreateService.new(job).authorize(artifact_type: params[:artifact_type], filesize: params[:filesize])
if result[:status] == :success
content_type Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE
......@@ -284,7 +284,7 @@ module API
artifacts = params[:file]
metadata = params[:metadata]
result = ::Ci::CreateJobArtifactsService.new(job).execute(artifacts, params, metadata_file: metadata)
result = ::Ci::JobArtifacts::CreateService.new(job).execute(artifacts, params, metadata_file: metadata)
if result[:status] == :success
status :created
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe Ci::CreateJobArtifactsService do
RSpec.describe Ci::JobArtifacts::CreateService do
let_it_be(:project) { create(:project) }
let(:service) { described_class.new(job) }
let(:job) { create(:ci_build, project: project) }
......
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