Skip to content

Commit

Permalink
Merge pull request #13679 from nimsara66/8674-8672
Browse files Browse the repository at this point in the history
Implement endpoint cert and DevPortal search tests
  • Loading branch information
hisanhunais authored Feb 20, 2025
2 parents 8a1085b + 7d031b4 commit d039263
Show file tree
Hide file tree
Showing 4 changed files with 389 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,25 @@ public APIListDTO getAPIs(int offset, int limit) throws ApiException {
return apiResponse.getData();
}

/**
* Get APIs for the given limit, offset values and query
*
* @param offset starting position
* @param limit maximum number of APIs to return
* @param tenantDomain tenant domain
* @param query search query
* @return APIs for the given limit and offset values
* @throws ApiException
*/
public APIListDTO getAPIs(int offset, int limit, String tenantDomain, String query) throws ApiException {

setActivityID();
ApiResponse<APIListDTO> apiResponse = apIsApi.apisGetWithHttpInfo(limit, offset,
tenantDomain, query, null);
Assert.assertEquals(HttpStatus.SC_OK, apiResponse.getStatusCode());
return apiResponse.getData();
}

/**
* Get application by ID
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@ public void testSearchEndpointCertificates() throws ApiException, ParseException
endpointCertificates = restAPIPublisher.getEndpointCertificiates("https://abc.com", null);
Assert.assertNotNull(endpointCertificates.getCertificates());
Assert.assertEquals(endpointCertificates.getCertificates().size(), 0);
endpointCertificates = restAPIPublisher.getEndpointCertificiates("https://localhost", null);
Assert.assertNotNull(endpointCertificates.getCertificates());
Assert.assertEquals(endpointCertificates.getCertificates().size(), 2);
endpointCertificates = restAPIPublisher.getEndpointCertificiates(endpoint + "/api/v1", null);
Assert.assertNotNull(endpointCertificates.getCertificates());
Assert.assertEquals(endpointCertificates.getCertificates().size(), 2);
}

@Test(groups = {"wso2.am"}, description = "test Upload Endpoint Certificate", dependsOnMethods = {
Expand Down
Loading

0 comments on commit d039263

Please sign in to comment.