mirror of
https://github.com/dadosfera/maestro.git
synced 2026-09-15 11:14:48 +00:00
UPDATE: type CDC input calls against the protospack gRPC contracts
Review (maestro #510): drop every 'as any' on the Input write client (AddCdcTable/RemoveCdcTable/UnmarkTableDeleted take the generated request types), type IPipelineV2.config, and build the CdcTable payload in one mapper so 'name' mirrors table_name in a single place. isCdc via helper, no '!!'. Co-Authored-By: WOZCODE <contact@withwoz.com>
This commit is contained in:
@@ -157,6 +157,7 @@ describe('PlatformApiController - addTable', () => {
|
||||
const result = await controller.addTable('pid', 'iid', body, mockUser);
|
||||
|
||||
expect(inputsService.addCdcTable).toHaveBeenCalledWith({
|
||||
client_id: 'c1',
|
||||
id: 'iid',
|
||||
table: {
|
||||
table_schema: 'public',
|
||||
@@ -198,6 +199,7 @@ describe('PlatformApiController - addTable', () => {
|
||||
await controller.addTable('pid', 'iid', icebergBody, mockUser);
|
||||
|
||||
expect(inputsService.addCdcTable).toHaveBeenCalledWith({
|
||||
client_id: 'c1',
|
||||
id: 'iid',
|
||||
table: {
|
||||
table_schema: 'public',
|
||||
@@ -228,6 +230,7 @@ describe('PlatformApiController - addTable', () => {
|
||||
await controller.addTable('pid', 'iid', columnsBody, mockUser);
|
||||
|
||||
expect(inputsService.addCdcTable).toHaveBeenCalledWith({
|
||||
client_id: 'c1',
|
||||
id: 'iid',
|
||||
table: {
|
||||
table_schema: 'public',
|
||||
@@ -254,6 +257,7 @@ describe('PlatformApiController - addTable', () => {
|
||||
await expect(controller.addTable('pid', 'iid', body, mockUser)).rejects.toThrow('platform down');
|
||||
|
||||
expect(inputsService.removeCdcTable).toHaveBeenCalledWith({
|
||||
client_id: 'c1',
|
||||
id: 'iid',
|
||||
table_name: 'orders',
|
||||
info: { customer_id: 'c1', customer: 'cust', user_id: 'u1' },
|
||||
|
||||
Reference in New Issue
Block a user