File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change 136
136
end
137
137
end
138
138
139
- context 'with cors_hax param' do
140
- it 'renders No Content response with location of the archived log' do
141
- stub_request ( :get , "#{ Travis . config . logs_api . url } /logs/#{ job . id } ?by=job_id&source=api" )
142
- . to_return (
143
- status : 200 ,
144
- body : JSON . dump (
145
- content : nil ,
146
- aggregated_at : Time . now ,
147
- archived_at : Time . now ,
148
- archive_verified : true
149
- )
150
- )
151
- allow_any_instance_of ( Travis ::RemoteLog ) . to receive ( :archived_url ) . and_return (
152
- "https://s3.amazonaws.com/archive.travis-ci.org/jobs/#{ job . id } /log.txt"
153
- )
154
- response = get (
155
- "/jobs/#{ job . id } /log.txt?cors_hax=true" ,
156
- { } ,
157
- { 'HTTP_ACCEPT' => 'text/plain; version=2' }
158
- )
159
- expect ( response . status ) . to eq 204
160
- expect ( response . headers [ 'Location' ] ) . to eq (
161
- "https://s3.amazonaws.com/archive.travis-ci.org/jobs/#{ job . id } /log.txt"
162
- )
163
- end
164
- end
165
-
166
139
context 'with chunked log requested' do
167
140
it 'succeeds' do
168
141
stub_request ( :get , "#{ Travis . config . logs_api . url } /logs/#{ job . id } ?by=job_id&source=api" )
You can’t perform that action at this time.
0 commit comments