Skip to content

Commit

Permalink
- Fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
rathnapandi committed Oct 8, 2024
1 parent d90f270 commit 69841c0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.axway.apim.api.specification;

import com.axway.apim.api.API;
import com.axway.apim.lib.CoreParameters;
import com.axway.apim.lib.error.AppException;
import graphql.schema.idl.SchemaParser;
import graphql.schema.idl.errors.SchemaProblem;
Expand Down Expand Up @@ -42,7 +41,6 @@ public APISpecType getAPIDefinitionType() throws AppException {

@Override
public boolean parse(byte[] apiSpecificationContent){
CoreParameters.getInstance().setOverrideSpecBasePath(false); // Not allowing override base path for Graphql, hence changing it to false.
this.apiSpecificationContent = apiSpecificationContent;
SchemaParser schemaParser = new SchemaParser();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public void run(@Optional @CitrusResource TestContext context) throws IOExceptio
JsonNode exportedAPIConfig = mapper.readTree(Files.newInputStream(new File(exportedAPIConfigFile).toPath()));
assertEquals(exportedAPIConfig.get("version").asText(), "1.0.1");
assertEquals(exportedAPIConfig.get("organization").asText(), "API Development " + context.getVariable("orgNumber"));
//assertEquals(exportedAPIConfig.get("backendBasepath").asText(), "https://petstore.swagger.io");
assertEquals(exportedAPIConfig.get("state").asText(), "published");
assertEquals(exportedAPIConfig.get("path").asText(), context.getVariable("apiPath"));
assertEquals(exportedAPIConfig.get("name").asText(), context.getVariable("apiName"));
Expand All @@ -99,12 +98,10 @@ public void run(@Optional @CitrusResource TestContext context) throws IOExceptio
ClientApplication app = exportedApps.get(0);
assertTrue(app.getApiAccess() == null || app.getApiAccess().isEmpty(), "Exported Apps should not contains API-Access");
assertNull(app.getId(), "The ID of an application shouldn't be exported.");
assertNull(app.getOrganization(), "The Org-ID of an application shouldn't be exported.");
assertNull(app.getAppQuota(), "The application quota should not be exported. It's not supported by the export!");
assertTrue(new File(context.getVariable("exportLocation") + "/" + context.getVariable("exportFolder") + "/swagger.io.crt").exists(), "Certificate swagger.io.crt is missing");
assertTrue(new File(context.getVariable("exportLocation") + "/" + context.getVariable("exportFolder") + "/StarfieldServicesRootCertificateAuthority-G2.crt").exists(), "Certificate StarfieldServicesRootCertificateAuthority-G2.crt is missing");
assertTrue(new File(context.getVariable("exportLocation") + "/" + context.getVariable("exportFolder") + "/AmazonRootCA1.crt").exists(), "Certificate AmazonRootCA1.crt is missing");
// assertTrue(new File(context.getVariable("exportLocation") + "/" + context.getVariable("exportFolder") + "/Amazon.crt").exists(), "Certificate Amazon.crt is missing");
assertTrue(new File(context.getVariable("exportLocation") + "/" + context.getVariable("exportFolder") + "/" + context.getVariable("exportAPIName")).exists(), "Exported Swagger-File is missing");
}
}

0 comments on commit 69841c0

Please sign in to comment.