diff options
Diffstat (limited to 'spec/lib/gitlab/cleanup/orphan_job_artifact_files_spec.rb')
-rw-r--r-- | spec/lib/gitlab/cleanup/orphan_job_artifact_files_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/cleanup/orphan_job_artifact_files_spec.rb b/spec/lib/gitlab/cleanup/orphan_job_artifact_files_spec.rb index 75ef75fccc9..966c4c8b2fb 100644 --- a/spec/lib/gitlab/cleanup/orphan_job_artifact_files_spec.rb +++ b/spec/lib/gitlab/cleanup/orphan_job_artifact_files_spec.rb @@ -28,6 +28,12 @@ describe Gitlab::Cleanup::OrphanJobArtifactFiles do expect { cleanup.run! }.to raise_error('Invalid niceness') end + it 'passes correct arguments to ionice' do + allow(Gitlab::Utils).to receive(:which).with('ionice').and_return('/fake/ionice') + expect(Open3).to receive(:popen3).with('/fake/ionice', '-c', any_args) + cleanup.run! + end + it 'finds artifacts on disk' do artifact = create(:ci_job_artifact, :archive) |