Skip to content

Commit

Permalink
fix(1541): Provide a template for removeHeaders EIP
Browse files Browse the repository at this point in the history
  • Loading branch information
tplevko authored and lordrip committed Oct 9, 2024
1 parent 8e975a0 commit 5291966
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,15 @@ describe('CamelComponentDefaultService', () => {
expect((filterDefault.filter!.expression as any).simple).toEqual({});
expect(filterDefault.filter!.steps).toBeUndefined();
});

it('should return the default value for a removeHeaders processor', () => {
const removeHeadersDefault = CamelComponentDefaultService.getDefaultNodeDefinitionValue({
type: 'processor',
name: 'removeHeaders',
} as DefinedComponent) as any;
expect(removeHeadersDefault.removeHeaders).toBeDefined();
expect(removeHeadersDefault.removeHeaders.id as string).toMatch(/^removeHeaders-/);
expect(removeHeadersDefault.removeHeaders.pattern).toEqual('*');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ export class CamelComponentDefaultService {
message: "\${body}"
`);

case 'removeHeaders':
return parse(`
removeHeaders:
id: ${getCamelRandomId('removeHeaders')}
pattern: "*"
`);

case 'doCatch':
return parse(`
id: ${getCamelRandomId('doCatch')}
Expand Down

0 comments on commit 5291966

Please sign in to comment.