|
@@ -1,15 +1,23 @@
|
|
|
import fetchMock from 'fetch-mock-jest';
|
|
|
+import { ConnectorAction } from 'generated-sources';
|
|
|
import * as actions from 'redux/actions/actions';
|
|
|
import * as thunks from 'redux/actions/thunks';
|
|
|
import {
|
|
|
- connectorsPayload,
|
|
|
+ connects,
|
|
|
connectorsServerPayload,
|
|
|
- connectsPayload,
|
|
|
+ connectors,
|
|
|
+ connectorServerPayload,
|
|
|
+ connector,
|
|
|
+ tasksServerPayload,
|
|
|
+ tasks,
|
|
|
} from 'redux/reducers/connect/__test__/fixtures';
|
|
|
import mockStoreCreator from 'redux/store/configureStore/mockStoreCreator';
|
|
|
|
|
|
const store = mockStoreCreator;
|
|
|
const clusterName = 'local';
|
|
|
+const connectName = 'first';
|
|
|
+const connectorName = 'hdfs-source-connector';
|
|
|
+const taskId = 10;
|
|
|
|
|
|
describe('Thunks', () => {
|
|
|
afterEach(() => {
|
|
@@ -19,17 +27,11 @@ describe('Thunks', () => {
|
|
|
|
|
|
describe('fetchConnects', () => {
|
|
|
it('creates GET_CONNECTS__SUCCESS when fetching connects', async () => {
|
|
|
- fetchMock.getOnce(
|
|
|
- `/api/clusters/${clusterName}/connects`,
|
|
|
- connectsPayload
|
|
|
- );
|
|
|
+ fetchMock.getOnce(`/api/clusters/${clusterName}/connects`, connects);
|
|
|
await store.dispatch(thunks.fetchConnects(clusterName));
|
|
|
expect(store.getActions()).toEqual([
|
|
|
actions.fetchConnectsAction.request(),
|
|
|
- actions.fetchConnectsAction.success({
|
|
|
- ...store.getState().connect,
|
|
|
- connects: connectsPayload,
|
|
|
- }),
|
|
|
+ actions.fetchConnectsAction.success({ connects }),
|
|
|
]);
|
|
|
});
|
|
|
|
|
@@ -41,7 +43,7 @@ describe('Thunks', () => {
|
|
|
actions.fetchConnectsAction.failure({
|
|
|
alert: {
|
|
|
subject: 'connects',
|
|
|
- title: `Kafka Connect`,
|
|
|
+ title: 'Kafka Connect',
|
|
|
response: {
|
|
|
status: 404,
|
|
|
statusText: 'Not Found',
|
|
@@ -54,7 +56,7 @@ describe('Thunks', () => {
|
|
|
});
|
|
|
|
|
|
describe('fetchConnectors', () => {
|
|
|
- it('creates GET_CONNECTORS__SUCCESS when fetching connects', async () => {
|
|
|
+ it('creates GET_CONNECTORS__SUCCESS when fetching connectors', async () => {
|
|
|
fetchMock.getOnce(
|
|
|
`/api/clusters/${clusterName}/connectors`,
|
|
|
connectorsServerPayload
|
|
@@ -62,14 +64,11 @@ describe('Thunks', () => {
|
|
|
await store.dispatch(thunks.fetchConnectors(clusterName));
|
|
|
expect(store.getActions()).toEqual([
|
|
|
actions.fetchConnectorsAction.request(),
|
|
|
- actions.fetchConnectorsAction.success({
|
|
|
- ...store.getState().connect,
|
|
|
- connectors: connectorsPayload,
|
|
|
- }),
|
|
|
+ actions.fetchConnectorsAction.success({ connectors }),
|
|
|
]);
|
|
|
});
|
|
|
|
|
|
- it('creates GET_CONNECTORS__SUCCESS when fetching connects in silent mode', async () => {
|
|
|
+ it('creates GET_CONNECTORS__SUCCESS when fetching connectors in silent mode', async () => {
|
|
|
fetchMock.getOnce(
|
|
|
`/api/clusters/${clusterName}/connectors`,
|
|
|
connectorsServerPayload
|
|
@@ -78,7 +77,7 @@ describe('Thunks', () => {
|
|
|
expect(store.getActions()).toEqual([
|
|
|
actions.fetchConnectorsAction.success({
|
|
|
...store.getState().connect,
|
|
|
- connectors: connectorsPayload,
|
|
|
+ connectors,
|
|
|
}),
|
|
|
]);
|
|
|
});
|
|
@@ -103,10 +102,105 @@ describe('Thunks', () => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('deleteConnector', () => {
|
|
|
- const connectName = 'first';
|
|
|
- const connectorName = 'hdfs-source-connector';
|
|
|
+ describe('fetchConnector', () => {
|
|
|
+ it('creates GET_CONNECTOR__SUCCESS when fetching connects', async () => {
|
|
|
+ fetchMock.getOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}`,
|
|
|
+ connectorServerPayload
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.fetchConnector(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.fetchConnectorAction.request(),
|
|
|
+ actions.fetchConnectorAction.success({ connector }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('creates GET_CONNECTOR__FAILURE', async () => {
|
|
|
+ fetchMock.getOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}`,
|
|
|
+ 404
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.fetchConnector(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.fetchConnectorAction.request(),
|
|
|
+ actions.fetchConnectorAction.failure({
|
|
|
+ alert: {
|
|
|
+ subject: 'local-first-hdfs-source-connector',
|
|
|
+ title: 'Kafka Connect Connector',
|
|
|
+ response: {
|
|
|
+ status: 404,
|
|
|
+ statusText: 'Not Found',
|
|
|
+ body: undefined,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+ });
|
|
|
|
|
|
+ describe('createConnector', () => {
|
|
|
+ it('creates POST_CONNECTOR__SUCCESS when fetching connects', async () => {
|
|
|
+ fetchMock.postOnce(
|
|
|
+ {
|
|
|
+ url: `/api/clusters/${clusterName}/connects/${connectName}/connectors`,
|
|
|
+ body: {
|
|
|
+ name: connectorName,
|
|
|
+ config: connector.config,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ connectorServerPayload
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.createConnector(clusterName, connectName, {
|
|
|
+ name: connectorName,
|
|
|
+ config: connector.config,
|
|
|
+ })
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.createConnectorAction.request(),
|
|
|
+ actions.createConnectorAction.success({ connector }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('creates POST_CONNECTOR__FAILURE', async () => {
|
|
|
+ fetchMock.postOnce(
|
|
|
+ {
|
|
|
+ url: `/api/clusters/${clusterName}/connects/${connectName}/connectors`,
|
|
|
+ body: {
|
|
|
+ name: connectorName,
|
|
|
+ config: connector.config,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ 404
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.createConnector(clusterName, connectName, {
|
|
|
+ name: connectorName,
|
|
|
+ config: connector.config,
|
|
|
+ })
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.createConnectorAction.request(),
|
|
|
+ actions.createConnectorAction.failure({
|
|
|
+ alert: {
|
|
|
+ subject: 'local-first',
|
|
|
+ title: 'Kafka Connect Connector Create',
|
|
|
+ response: {
|
|
|
+ status: 404,
|
|
|
+ statusText: 'Not Found',
|
|
|
+ body: undefined,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('deleteConnector', () => {
|
|
|
it('creates DELETE_CONNECTOR__SUCCESS', async () => {
|
|
|
fetchMock.deleteOnce(
|
|
|
`/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}`,
|
|
@@ -121,9 +215,7 @@ describe('Thunks', () => {
|
|
|
);
|
|
|
expect(store.getActions()).toEqual([
|
|
|
actions.deleteConnectorAction.request(),
|
|
|
- actions.deleteConnectorAction.success({
|
|
|
- ...store.getState().connect,
|
|
|
- }),
|
|
|
+ actions.deleteConnectorAction.success({ connectorName }),
|
|
|
]);
|
|
|
});
|
|
|
|
|
@@ -132,15 +224,328 @@ describe('Thunks', () => {
|
|
|
`/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}`,
|
|
|
404
|
|
|
);
|
|
|
+ try {
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.deleteConnector(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ } catch {
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.deleteConnectorAction.request(),
|
|
|
+ actions.deleteConnectorAction.failure({
|
|
|
+ alert: {
|
|
|
+ subject: 'local-first-hdfs-source-connector',
|
|
|
+ title: 'Kafka Connect Connector Delete',
|
|
|
+ response: {
|
|
|
+ status: 404,
|
|
|
+ statusText: 'Not Found',
|
|
|
+ body: undefined,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('fetchConnectorTasks', () => {
|
|
|
+ it('creates GET_CONNECTOR_TASKS__SUCCESS when fetching connects', async () => {
|
|
|
+ fetchMock.getOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/tasks`,
|
|
|
+ tasksServerPayload
|
|
|
+ );
|
|
|
await store.dispatch(
|
|
|
- thunks.deleteConnector(clusterName, connectName, connectorName)
|
|
|
+ thunks.fetchConnectorTasks(clusterName, connectName, connectorName)
|
|
|
);
|
|
|
expect(store.getActions()).toEqual([
|
|
|
- actions.deleteConnectorAction.request(),
|
|
|
- actions.deleteConnectorAction.failure({
|
|
|
+ actions.fetchConnectorTasksAction.request(),
|
|
|
+ actions.fetchConnectorTasksAction.success({ tasks }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('creates GET_CONNECTOR_TASKS__FAILURE', async () => {
|
|
|
+ fetchMock.getOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/tasks`,
|
|
|
+ 404
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.fetchConnectorTasks(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.fetchConnectorTasksAction.request(),
|
|
|
+ actions.fetchConnectorTasksAction.failure({
|
|
|
+ alert: {
|
|
|
+ subject: 'local-first-hdfs-source-connector',
|
|
|
+ title: 'Kafka Connect Connector Tasks',
|
|
|
+ response: {
|
|
|
+ status: 404,
|
|
|
+ statusText: 'Not Found',
|
|
|
+ body: undefined,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('restartConnector', () => {
|
|
|
+ it('creates RESTART_CONNECTOR__SUCCESS when fetching connects', async () => {
|
|
|
+ fetchMock.postOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/action/${ConnectorAction.RESTART}`,
|
|
|
+ { message: 'success' }
|
|
|
+ );
|
|
|
+ fetchMock.getOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/tasks`,
|
|
|
+ tasksServerPayload
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.restartConnector(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.restartConnectorAction.request(),
|
|
|
+ actions.restartConnectorAction.success(),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('creates RESTART_CONNECTOR__FAILURE', async () => {
|
|
|
+ fetchMock.postOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/action/${ConnectorAction.RESTART}`,
|
|
|
+ 404
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.restartConnector(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.restartConnectorAction.request(),
|
|
|
+ actions.restartConnectorAction.failure({
|
|
|
+ alert: {
|
|
|
+ subject: 'local-first-hdfs-source-connector',
|
|
|
+ title: 'Kafka Connect Connector Tasks Restart',
|
|
|
+ response: {
|
|
|
+ status: 404,
|
|
|
+ statusText: 'Not Found',
|
|
|
+ body: undefined,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('pauseConnector', () => {
|
|
|
+ it('creates PAUSE_CONNECTOR__SUCCESS when fetching connects', async () => {
|
|
|
+ fetchMock.postOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/action/${ConnectorAction.PAUSE}`,
|
|
|
+ { message: 'success' }
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.pauseConnector(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.pauseConnectorAction.request(),
|
|
|
+ actions.pauseConnectorAction.success({ connectorName }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('creates PAUSE_CONNECTOR__FAILURE', async () => {
|
|
|
+ fetchMock.postOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/action/${ConnectorAction.PAUSE}`,
|
|
|
+ 404
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.pauseConnector(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.pauseConnectorAction.request(),
|
|
|
+ actions.pauseConnectorAction.failure({
|
|
|
+ alert: {
|
|
|
+ subject: 'local-first-hdfs-source-connector',
|
|
|
+ title: 'Kafka Connect Connector Pause',
|
|
|
+ response: {
|
|
|
+ status: 404,
|
|
|
+ statusText: 'Not Found',
|
|
|
+ body: undefined,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('resumeConnector', () => {
|
|
|
+ it('creates RESUME_CONNECTOR__SUCCESS when fetching connects', async () => {
|
|
|
+ fetchMock.postOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/action/${ConnectorAction.RESUME}`,
|
|
|
+ { message: 'success' }
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.resumeConnector(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.resumeConnectorAction.request(),
|
|
|
+ actions.resumeConnectorAction.success({ connectorName }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('creates RESUME_CONNECTOR__FAILURE', async () => {
|
|
|
+ fetchMock.postOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/action/${ConnectorAction.RESUME}`,
|
|
|
+ 404
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.resumeConnector(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.resumeConnectorAction.request(),
|
|
|
+ actions.resumeConnectorAction.failure({
|
|
|
+ alert: {
|
|
|
+ subject: 'local-first-hdfs-source-connector',
|
|
|
+ title: 'Kafka Connect Connector Resume',
|
|
|
+ response: {
|
|
|
+ status: 404,
|
|
|
+ statusText: 'Not Found',
|
|
|
+ body: undefined,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('restartConnectorTask', () => {
|
|
|
+ it('creates RESTART_CONNECTOR_TASK__SUCCESS when fetching connects', async () => {
|
|
|
+ fetchMock.postOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/tasks/${taskId}/action/restart`,
|
|
|
+ { message: 'success' }
|
|
|
+ );
|
|
|
+ fetchMock.getOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/tasks`,
|
|
|
+ tasksServerPayload
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.restartConnectorTask(
|
|
|
+ clusterName,
|
|
|
+ connectName,
|
|
|
+ connectorName,
|
|
|
+ taskId
|
|
|
+ )
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.restartConnectorTaskAction.request(),
|
|
|
+ actions.restartConnectorTaskAction.success(),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('creates RESTART_CONNECTOR_TASK__FAILURE', async () => {
|
|
|
+ fetchMock.postOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/tasks/${taskId}/action/restart`,
|
|
|
+ 404
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.restartConnectorTask(
|
|
|
+ clusterName,
|
|
|
+ connectName,
|
|
|
+ connectorName,
|
|
|
+ taskId
|
|
|
+ )
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.restartConnectorTaskAction.request(),
|
|
|
+ actions.restartConnectorTaskAction.failure({
|
|
|
+ alert: {
|
|
|
+ subject: 'local-first-hdfs-source-connector-10',
|
|
|
+ title: 'Kafka Connect Connector Task Restart',
|
|
|
+ response: {
|
|
|
+ status: 404,
|
|
|
+ statusText: 'Not Found',
|
|
|
+ body: undefined,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('fetchConnectorConfig', () => {
|
|
|
+ it('creates GET_CONNECTOR_CONFIG__SUCCESS when fetching connects', async () => {
|
|
|
+ fetchMock.getOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/config`,
|
|
|
+ connector.config
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.fetchConnectorConfig(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.fetchConnectorConfigAction.request(),
|
|
|
+ actions.fetchConnectorConfigAction.success({
|
|
|
+ config: connector.config,
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('creates GET_CONNECTOR_CONFIG__FAILURE', async () => {
|
|
|
+ fetchMock.getOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/config`,
|
|
|
+ 404
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.fetchConnectorConfig(clusterName, connectName, connectorName)
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.fetchConnectorConfigAction.request(),
|
|
|
+ actions.fetchConnectorConfigAction.failure({
|
|
|
+ alert: {
|
|
|
+ subject: 'local-first-hdfs-source-connector',
|
|
|
+ title: 'Kafka Connect Connector Config',
|
|
|
+ response: {
|
|
|
+ status: 404,
|
|
|
+ statusText: 'Not Found',
|
|
|
+ body: undefined,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('updateConnectorConfig', () => {
|
|
|
+ it('creates PATCH_CONNECTOR_CONFIG__SUCCESS when fetching connects', async () => {
|
|
|
+ fetchMock.putOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/config`,
|
|
|
+ connectorServerPayload
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.updateConnectorConfig(
|
|
|
+ clusterName,
|
|
|
+ connectName,
|
|
|
+ connectorName,
|
|
|
+ connector.config
|
|
|
+ )
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.updateConnectorConfigAction.request(),
|
|
|
+ actions.updateConnectorConfigAction.success({ connector }),
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('creates PATCH_CONNECTOR_CONFIG__FAILURE', async () => {
|
|
|
+ fetchMock.putOnce(
|
|
|
+ `/api/clusters/${clusterName}/connects/${connectName}/connectors/${connectorName}/config`,
|
|
|
+ 404
|
|
|
+ );
|
|
|
+ await store.dispatch(
|
|
|
+ thunks.updateConnectorConfig(
|
|
|
+ clusterName,
|
|
|
+ connectName,
|
|
|
+ connectorName,
|
|
|
+ connector.config
|
|
|
+ )
|
|
|
+ );
|
|
|
+ expect(store.getActions()).toEqual([
|
|
|
+ actions.updateConnectorConfigAction.request(),
|
|
|
+ actions.updateConnectorConfigAction.failure({
|
|
|
alert: {
|
|
|
subject: 'local-first-hdfs-source-connector',
|
|
|
- title: 'Kafka Connect Connector Delete',
|
|
|
+ title: 'Kafka Connect Connector Config Update',
|
|
|
response: {
|
|
|
status: 404,
|
|
|
statusText: 'Not Found',
|