Skip to content

Commit

Permalink
Polish test
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiahub committed Aug 8, 2023
1 parent 3b5dca4 commit b117e19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ui/src/app/shared/api/task.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,15 @@ describe('shared/api/task.service.ts', () => {
taskService.getExecutionLogs(
TaskExecution.parse({
externalExecutionId: 'foo',
schemaTarget: 'boot3',
arguments: [
'--spring.cloud.data.flow.platformname=bar'
]
})
);
const httpUri = mockHttp.get.calls.mostRecent().args[0];
const headerArgs = mockHttp.get.calls.mostRecent().args[1].headers;
expect(httpUri).toEqual('/tasks/logs/foo?platformName=bar&schemaTarget=boot2');
expect(httpUri).toEqual('/tasks/logs/foo?platformName=bar&schemaTarget=boot3');
expect(headerArgs.get('Content-Type')).toEqual('application/json');
expect(headerArgs.get('Accept')).toEqual('application/json');
});
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/api/task.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export class TaskService {
}
const url = taskExecution?._links && taskExecution?._links['tasks/logs'] !== undefined
? taskExecution?._links['tasks/logs'].href :
UrlUtilities.calculateBaseApiUrl() + `tasks/logs/${taskExecution.externalExecutionId}${platformName}&schemaTarget=${taskExecution.schemaTarget}`;
UrlUtilities.calculateBaseApiUrl() + `tasks/logs/${taskExecution.externalExecutionId}?platformName=${platformName}&schemaTarget=${taskExecution.schemaTarget}`;
const params = new HttpParams({encoder: new DataflowEncoder()});
return this.httpClient
.get<any>(url, {
Expand Down

0 comments on commit b117e19

Please sign in to comment.