Skip to content

Commit

Permalink
Merge pull request #543 from rundeck/RUN-2080
Browse files Browse the repository at this point in the history
RUN-2080: fix #538 format parameter overrides content type
  • Loading branch information
gschueler authored Dec 1, 2023
2 parents 5f0e865 + eaead22 commit 30fb6b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ Call<ResponseBody> exportJobs(
Call<ImportResult> loadJobs(
@Path("project") String project,
@Body RequestBody body,
@Query("format") String format,
@Query("dupeOption") String duplicate,
@Query("uuidOption") String uuids
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ public int load(
ImportResult importResult = getRdTool().apiCall(api -> api.loadJobs(
project,
requestBody,
fileOptions.getFormat().toString(),
options.getDuplicate().toString(),
options.isRemoveUuids() ? UUID_REMOVE : UUID_PRESERVE
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ class JobsSpec extends Specification {
def result = command.load(new JobLoadOptions(), opts,new ProjectNameOptions(project:'ProjectName'),new VerboseOption())

then:
1 * api.loadJobs('ProjectName', _, 'yaml', _, _) >>
1 * api.loadJobs('ProjectName', _, _, _) >>
Calls.response(new ImportResult(succeeded: [], skipped: [], failed: [
new JobLoadItem(error: 'Test Error', name: 'Job Name')
]
Expand Down Expand Up @@ -496,7 +496,7 @@ class JobsSpec extends Specification {
then:
1 * api.loadJobs('ProjectName', { RequestBody body->
body.contentType()==expectedType
}, format.toString(), _, _) >>
}, _, _) >>
Calls.response(new ImportResult(succeeded: [new JobLoadItem( id:'jobid',name: 'Job Name')], skipped: [], failed: []))
0 * api._(*_)
1 * out.info('1 Jobs Succeeded:\n')
Expand Down Expand Up @@ -529,7 +529,7 @@ class JobsSpec extends Specification {
def result = command.load(new JobLoadOptions(), opts,new ProjectNameOptions(project:'ProjectName'),new VerboseOption(verbose: true))

then:
1 * api.loadJobs('ProjectName', _, 'yaml', _, _) >>
1 * api.loadJobs('ProjectName', _, _, _) >>
Calls.response(new ImportResult(succeeded: [], skipped: [], failed: [resultItem]))
0 * api._(*_)
1 * out.info('1 Jobs Failed:\n')
Expand Down

0 comments on commit 30fb6b7

Please sign in to comment.