Skip to content

Commit f7f4591

Browse files
committed
Test bad request when resetting running connector
1 parent e52d6cc commit f7f4591

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

api/src/test/java/io/kafbat/ui/KafkaConnectServiceTests.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ public void shouldReturn400WhenTryingToCreateConnectorWithExistingName() {
408408
.expectStatus()
409409
.isBadRequest();
410410
}
411-
411+
412412
@Test
413413
public void shouldResetConnectorWhenInStoppedState() {
414414
webTestClient.put()
@@ -424,4 +424,15 @@ public void shouldResetConnectorWhenInStoppedState() {
424424
.expectStatus().isOk();
425425

426426
}
427+
428+
@Test
429+
public void shouldReturn400WhenResettingConnectorInRunningState() {
430+
431+
webTestClient.delete()
432+
.uri("/api/clusters/{clusterName}/connectors/{connectName}/connectors/{connectorName}/offsets", LOCAL,
433+
connectName, connectorName)
434+
.exchange()
435+
.expectStatus().isBadRequest();
436+
437+
}
427438
}

0 commit comments

Comments
 (0)