@ -120,8 +120,7 @@ class Runner::Strategy::Poseidon < Runner::Strategy
|
|||||||
|
|
||||||
# First, clean the workspace and second, copy all files to their location.
|
# First, clean the workspace and second, copy all files to their location.
|
||||||
# This ensures that no artifacts from a previous submission remain in the workspace.
|
# This ensures that no artifacts from a previous submission remain in the workspace.
|
||||||
# TODO: Switch back to clean diretory content only. See https://github.com/openHPI/poseidon/issues/42
|
body = {copy: copy, delete: ['./*']}
|
||||||
body = {copy: copy, delete: ['/workspace']}
|
|
||||||
response = self.class.http_connection.patch url, body.to_json
|
response = self.class.http_connection.patch url, body.to_json
|
||||||
return if response.status == 204
|
return if response.status == 204
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ describe Runner::Strategy::Poseidon do
|
|||||||
WebMock
|
WebMock
|
||||||
.stub_request(:patch, "#{described_class.config[:url]}/runners/#{runner_id}/files")
|
.stub_request(:patch, "#{described_class.config[:url]}/runners/#{runner_id}/files")
|
||||||
.with(
|
.with(
|
||||||
body: {copy: [{path: file.filepath, content: encoded_file_content}], delete: ['/workspace']},
|
body: {copy: [{path: file.filepath, content: encoded_file_content}], delete: ['./*']},
|
||||||
headers: {'Content-Type' => 'application/json'}
|
headers: {'Content-Type' => 'application/json'}
|
||||||
)
|
)
|
||||||
.to_return(body: response_body, status: response_status)
|
.to_return(body: response_body, status: response_status)
|
||||||
|
Reference in New Issue
Block a user