mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-31 18:48:35 +00:00 
			
		
		
		
	fix: renamed API endpoints from resolution to status (#14330)
This commit is contained in:
		
							parent
							
								
									f2652e079c
								
							
						
					
					
						commit
						a4f9b0ec4e
					
				| @ -320,7 +320,7 @@ class OMetaTestsMixin: | ||||
|         Returns: | ||||
|             TestCaseResolutionStatus | ||||
|         """ | ||||
|         path = self.get_suffix(TestCase) + "/testCaseResolutionStatus" | ||||
|         path = self.get_suffix(TestCase) + "/testCaseIncidentStatus" | ||||
|         response = self.client.post(path, data=data.json(encoder=show_secrets_encoder)) | ||||
| 
 | ||||
|         return TestCaseResolutionStatus(**response) | ||||
|  | ||||
| @ -18,7 +18,7 @@ import org.openmetadata.service.util.RestUtil; | ||||
| import org.openmetadata.service.util.ResultList; | ||||
| 
 | ||||
| public class TestCaseResolutionStatusRepository extends EntityTimeSeriesRepository<TestCaseResolutionStatus> { | ||||
|   public static final String COLLECTION_PATH = "/v1/dataQuality/testCases/testCaseResolutionStatus"; | ||||
|   public static final String COLLECTION_PATH = "/v1/dataQuality/testCases/testCaseIncidentStatus"; | ||||
| 
 | ||||
|   public TestCaseResolutionStatusRepository() { | ||||
|     super( | ||||
|  | ||||
| @ -53,7 +53,7 @@ import org.openmetadata.service.util.RestUtil; | ||||
| import org.openmetadata.service.util.ResultList; | ||||
| 
 | ||||
| @Slf4j | ||||
| @Path("/v1/dataQuality/testCases/testCaseResolutionStatus") | ||||
| @Path("/v1/dataQuality/testCases/testCaseIncidentStatus") | ||||
| @Tag(name = "Test Case Failure Status", description = "APIs to test case failure status from resolution center.") | ||||
| @Hidden | ||||
| @Produces(MediaType.APPLICATION_JSON) | ||||
| @ -61,7 +61,7 @@ import org.openmetadata.service.util.ResultList; | ||||
| @Collection(name = "TestCases") | ||||
| public class TestCaseResolutionStatusResource | ||||
|     extends EntityTimeSeriesResource<TestCaseResolutionStatus, TestCaseResolutionStatusRepository> { | ||||
|   public static final String COLLECTION_PATH = "/v1/dataQuality/testCases/testCaseResolutionStatus"; | ||||
|   public static final String COLLECTION_PATH = "/v1/dataQuality/testCases/testCaseIncidentStatus"; | ||||
| 
 | ||||
|   public TestCaseResolutionStatusResource(Authorizer authorizer) { | ||||
|     super(Entity.TEST_CASE_RESOLUTION_STATUS, authorizer); | ||||
|  | ||||
| @ -1449,7 +1449,7 @@ public class TestCaseResourceTest extends EntityResourceTest<TestCase, CreateTes | ||||
|   private ResultList<TestCaseResolutionStatus> getTestCaseFailureStatus( | ||||
|       Long startTs, Long endTs, String assignee, TestCaseResolutionStatusTypes testCaseResolutionStatusType) | ||||
|       throws HttpResponseException { | ||||
|     WebTarget target = getCollection().path("/testCaseResolutionStatus"); | ||||
|     WebTarget target = getCollection().path("/testCaseIncidentStatus"); | ||||
|     target = target.queryParam("startTs", startTs); | ||||
|     target = target.queryParam("endTs", endTs); | ||||
|     target = assignee != null ? target.queryParam("assignee", assignee) : target; | ||||
| @ -1462,13 +1462,13 @@ public class TestCaseResourceTest extends EntityResourceTest<TestCase, CreateTes | ||||
|   } | ||||
| 
 | ||||
|   private TestCaseResolutionStatus getTestCaseFailureStatusById(UUID id) throws HttpResponseException { | ||||
|     String pathUrl = "/testCaseResolutionStatus/" + id; | ||||
|     String pathUrl = "/testCaseIncidentStatus/" + id; | ||||
|     WebTarget target = getCollection().path(pathUrl); | ||||
|     return TestUtils.get(target, TestCaseResolutionStatus.class, ADMIN_AUTH_HEADERS); | ||||
|   } | ||||
| 
 | ||||
|   private ResultList<TestCaseResolutionStatus> getTestCaseFailureStatusByStateId(UUID id) throws HttpResponseException { | ||||
|     String pathUrl = "/testCaseResolutionStatus/stateId/" + id; | ||||
|     String pathUrl = "/testCaseIncidentStatus/stateId/" + id; | ||||
|     WebTarget target = getCollection().path(pathUrl); | ||||
|     return TestUtils.get( | ||||
|         target, TestCaseResolutionStatusResource.TestCaseResolutionStatusResultList.class, ADMIN_AUTH_HEADERS); | ||||
| @ -1476,7 +1476,7 @@ public class TestCaseResourceTest extends EntityResourceTest<TestCase, CreateTes | ||||
| 
 | ||||
|   private ResultList<TestCaseResolutionStatus> getTestCaseFailureStatus( | ||||
|       int limit, String offset, Boolean latest, Long startTs, Long endTs) throws HttpResponseException { | ||||
|     WebTarget target = getCollection().path("/testCaseResolutionStatus"); | ||||
|     WebTarget target = getCollection().path("/testCaseIncidentStatus"); | ||||
|     target = target.queryParam("limit", limit); | ||||
|     target = offset != null ? target.queryParam("offset", offset) : target; | ||||
|     target = latest != null ? target.queryParam("latest", latest) : target.queryParam("latest", false); | ||||
| @ -1496,13 +1496,13 @@ public class TestCaseResourceTest extends EntityResourceTest<TestCase, CreateTes | ||||
| 
 | ||||
|   private TestCaseResolutionStatus createTestCaseFailureStatus( | ||||
|       CreateTestCaseResolutionStatus createTestCaseFailureStatus) throws HttpResponseException { | ||||
|     WebTarget target = getCollection().path("/testCaseResolutionStatus"); | ||||
|     WebTarget target = getCollection().path("/testCaseIncidentStatus"); | ||||
|     return TestUtils.post(target, createTestCaseFailureStatus, TestCaseResolutionStatus.class, 200, ADMIN_AUTH_HEADERS); | ||||
|   } | ||||
| 
 | ||||
|   private void createTestCaseResolutionStatus(List<CreateTestCaseResolutionStatus> createTestCaseFailureStatus) | ||||
|       throws HttpResponseException { | ||||
|     WebTarget target = getCollection().path("/testCaseResolutionStatus"); | ||||
|     WebTarget target = getCollection().path("/testCaseIncidentStatus"); | ||||
| 
 | ||||
|     for (CreateTestCaseResolutionStatus testCaseFailureStatus : createTestCaseFailureStatus) { | ||||
|       TestUtils.post(target, testCaseFailureStatus, TestCaseResolutionStatus.class, 200, ADMIN_AUTH_HEADERS); | ||||
| @ -1511,12 +1511,12 @@ public class TestCaseResourceTest extends EntityResourceTest<TestCase, CreateTes | ||||
| 
 | ||||
|   private TestCaseResolutionStatus patchTestCaseResultFailureStatus( | ||||
|       UUID testCaseFailureStatusId, JsonPatch patch, Map<String, String> authHeaders) throws HttpResponseException { | ||||
|     WebTarget target = getCollection().path("/testCaseResolutionStatus/" + testCaseFailureStatusId); | ||||
|     WebTarget target = getCollection().path("/testCaseIncidentStatus/" + testCaseFailureStatusId); | ||||
|     return TestUtils.patch(target, patch, TestCaseResolutionStatus.class, authHeaders); | ||||
|   } | ||||
| 
 | ||||
|   private TestCaseResolutionStatus getTestCaseFailureStatus(UUID testCaseFailureStatusId) throws HttpResponseException { | ||||
|     WebTarget target = getCollection().path("/testCaseResolutionStatus/" + testCaseFailureStatusId); | ||||
|     WebTarget target = getCollection().path("/testCaseIncidentStatus/" + testCaseFailureStatusId); | ||||
|     return TestUtils.get(target, TestCaseResolutionStatus.class, ADMIN_AUTH_HEADERS); | ||||
|   } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Teddy
						Teddy