diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-07-09 15:18:31 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-07-09 15:19:52 +0300 |
commit | 5a9f23e780222218cc8418fd859669befcaed1b2 (patch) | |
tree | 083ffd594c90d7d812d754cc676483b1cb8f4b3e /spec/requests/api/jobs_spec.rb | |
parent | bc00803af03147452c12e9e2c7e8f0c0cba86f73 (diff) |
Fix and add specs for testing metadata entry
Diffstat (limited to 'spec/requests/api/jobs_spec.rb')
-rw-r--r-- | spec/requests/api/jobs_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/requests/api/jobs_spec.rb b/spec/requests/api/jobs_spec.rb index 50d6f4b4d99..8a2812d1576 100644 --- a/spec/requests/api/jobs_spec.rb +++ b/spec/requests/api/jobs_spec.rb @@ -535,12 +535,14 @@ describe API::Jobs do context 'authorized user' do context 'when trace is in ObjectStorage' do let!(:job) { create(:ci_build, :trace_artifact, pipeline: pipeline) } + let(:url) { 'http://object-storage/trace' } + let(:file) { expand_fixture_path('trace/sample_trace') } before do - stub_remote_trace_206 + stub_remote_url_206(url, file_path) allow_any_instance_of(JobArtifactUploader).to receive(:file_storage?) { false } - allow_any_instance_of(JobArtifactUploader).to receive(:url) { remote_trace_url } - allow_any_instance_of(JobArtifactUploader).to receive(:size) { remote_trace_size } + allow_any_instance_of(JobArtifactUploader).to receive(:url) { url } + allow_any_instance_of(JobArtifactUploader).to receive(:size) { File.size(file) } end it 'returns specific job trace' do |