Skip to content

Commit

Permalink
Add depreciation javadoc & annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasCAI-mlv committed Oct 9, 2024
1 parent 871f67f commit e520ef2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,11 @@ public HttpResponse<Void> bulkDelete(String namespace, @QueryValue(defaultValue
* @param name The resource quota
* @param dryrun Is dry run mode or not?
* @return An HTTP response
* @deprecated use {@link #bulkDelete(String, String, boolean)} instead.
*/
@Delete("/{name}{?dryrun}")
@Status(HttpStatus.NO_CONTENT)
@Deprecated(since = "1.13.0")
public HttpResponse<Void> delete(String namespace, String name,
@QueryValue(defaultValue = "false") boolean dryrun) {
Optional<ResourceQuota> resourceQuota = resourceQuotaService.findByName(namespace, name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ void shouldApplyUpdated() {
}

@Test
@SuppressWarnings("deprecation")
void shouldNotDeleteQuotaWhenNotFound() {
when(resourceQuotaService.findByName("test", "quota")).thenReturn(Optional.empty());
HttpResponse<Void> actual = resourceQuotaController.delete("test", "quota", false);
Expand All @@ -329,6 +330,7 @@ void shouldNotDeleteQuotaWhenNotFound() {
}

@Test
@SuppressWarnings("deprecation")
void shouldNotDeleteQuotaWhenDryRun() {
ResourceQuota resourceQuota = ResourceQuota.builder()
.metadata(Metadata.builder()
Expand All @@ -345,6 +347,7 @@ void shouldNotDeleteQuotaWhenDryRun() {
}

@Test
@SuppressWarnings("deprecation")
void shouldDeleteQuota() {
ResourceQuota resourceQuota = ResourceQuota.builder()
.metadata(Metadata.builder()
Expand Down

0 comments on commit e520ef2

Please sign in to comment.