Skip to content

Commit

Permalink
Test bad request when resetting running connector
Browse files Browse the repository at this point in the history
  • Loading branch information
Dugong42 committed Nov 5, 2024
1 parent e52d6cc commit f7f4591
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion api/src/test/java/io/kafbat/ui/KafkaConnectServiceTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ public void shouldReturn400WhenTryingToCreateConnectorWithExistingName() {
.expectStatus()
.isBadRequest();
}

@Test
public void shouldResetConnectorWhenInStoppedState() {
webTestClient.put()
Expand All @@ -424,4 +424,15 @@ public void shouldResetConnectorWhenInStoppedState() {
.expectStatus().isOk();

}

@Test
public void shouldReturn400WhenResettingConnectorInRunningState() {

webTestClient.delete()
.uri("/api/clusters/{clusterName}/connectors/{connectName}/connectors/{connectorName}/offsets", LOCAL,
connectName, connectorName)
.exchange()
.expectStatus().isBadRequest();

}
}

0 comments on commit f7f4591

Please sign in to comment.