mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-31 02:29:03 +00:00 
			
		
		
		
	This commit is contained in:
		
							parent
							
								
									fe575da962
								
							
						
					
					
						commit
						da286b7a5f
					
				| @ -325,13 +325,17 @@ public class TestSuiteResource extends EntityResource<TestSuite, TestSuiteReposi | |||||||
|   public Response delete( |   public Response delete( | ||||||
|       @Context UriInfo uriInfo, |       @Context UriInfo uriInfo, | ||||||
|       @Context SecurityContext securityContext, |       @Context SecurityContext securityContext, | ||||||
|  |       @Parameter(description = "Recursively delete this entity and it's children. (Default `false`)") | ||||||
|  |           @DefaultValue("false") | ||||||
|  |           @QueryParam("recursive") | ||||||
|  |           boolean recursive, | ||||||
|       @Parameter(description = "Hard delete the entity. (Default = `false`)") |       @Parameter(description = "Hard delete the entity. (Default = `false`)") | ||||||
|           @QueryParam("hardDelete") |           @QueryParam("hardDelete") | ||||||
|           @DefaultValue("false") |           @DefaultValue("false") | ||||||
|           boolean hardDelete, |           boolean hardDelete, | ||||||
|       @Parameter(description = "Topic Id", schema = @Schema(type = "UUID")) @PathParam("id") UUID id) |       @Parameter(description = "TestSuite Id", schema = @Schema(type = "UUID")) @PathParam("id") UUID id) | ||||||
|       throws IOException { |       throws IOException { | ||||||
|     return delete(uriInfo, securityContext, id, false, hardDelete, true); |     return delete(uriInfo, securityContext, id, recursive, hardDelete, true); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   private TestSuite getTestSuite(CreateTestSuite create, String user) throws IOException { |   private TestSuite getTestSuite(CreateTestSuite create, String user) throws IOException { | ||||||
|  | |||||||
| @ -1,6 +1,7 @@ | |||||||
| package org.openmetadata.catalog.resources.dqtests; | package org.openmetadata.catalog.resources.dqtests; | ||||||
| 
 | 
 | ||||||
| import static javax.ws.rs.core.Response.Status.BAD_REQUEST; | import static javax.ws.rs.core.Response.Status.BAD_REQUEST; | ||||||
|  | import static javax.ws.rs.core.Response.Status.NOT_FOUND; | ||||||
| import static org.junit.jupiter.api.Assertions.assertEquals; | import static org.junit.jupiter.api.Assertions.assertEquals; | ||||||
| import static org.openmetadata.catalog.util.TestUtils.ADMIN_AUTH_HEADERS; | import static org.openmetadata.catalog.util.TestUtils.ADMIN_AUTH_HEADERS; | ||||||
| import static org.openmetadata.catalog.util.TestUtils.assertResponse; | import static org.openmetadata.catalog.util.TestUtils.assertResponse; | ||||||
| @ -92,6 +93,16 @@ public class TestSuiteResourceTest extends EntityResourceTest<TestSuite, CreateT | |||||||
|         verifyTestCases(testSuite.getTests(), testCases1); |         verifyTestCases(testSuite.getTests(), testCases1); | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|  |     deleteEntity(testSuite1.getId(), true, false, ADMIN_AUTH_HEADERS); | ||||||
|  |     assertResponse( | ||||||
|  |         () -> getEntity(testSuite1.getId(), ADMIN_AUTH_HEADERS), | ||||||
|  |         NOT_FOUND, | ||||||
|  |         "testSuite instance for " + testSuite1.getId() + " not found"); | ||||||
|  |     Map<String, String> queryParams = new HashMap<>(); | ||||||
|  |     queryParams.put("include", "all"); | ||||||
|  |     TestSuite deletedTestSuite = getEntity(testSuite1.getId(), queryParams, null, ADMIN_AUTH_HEADERS); | ||||||
|  |     assertEquals(testSuite1.getId(), deletedTestSuite.getId()); | ||||||
|  |     assertEquals(deletedTestSuite.getDeleted(), true); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   public static ResultList<TestSuite> getTestSuites(Integer limit, String fields, Map<String, String> authHeaders) |   public static ResultList<TestSuite> getTestSuites(Integer limit, String fields, Map<String, String> authHeaders) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sriharsha Chintalapani
						Sriharsha Chintalapani