Skip to content

Commit

Permalink
- Add junit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rathnapandi committed Nov 1, 2024
1 parent 44a3b5a commit 38584a1
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 74 deletions.
149 changes: 75 additions & 74 deletions distribution/assembly/dist-release.xml
Original file line number Diff line number Diff line change
@@ -1,78 +1,79 @@
<assembly>
<id>release</id>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<includeSiteDirectory>false</includeSiteDirectory>
<baseDirectory>apim-cli-${pom.version}</baseDirectory>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-apim-adapter</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-apis</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-apps</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-organizations</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-users</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-settings</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-tool</include>
</includes>
<binaries>
<unpack>false</unpack>
<outputDirectory>lib</outputDirectory>
</binaries>
<sources>
<includeModuleDirectory>false</includeModuleDirectory>
<fileSets>
<fileSet>
<directory>assembly/</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>*.formatted</exclude>
<exclude>scripts/*</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/lib</outputDirectory>
<includes>
<include>*.xml</include>
</includes>
<excludes>
<exclude>cacheConfig.xml</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>assembly/scripts</directory>
<outputDirectory>/scripts</outputDirectory>
<includes>
<include>*.sh</include>
<include>*.bat</include>
</includes>
<fileMode>0755</fileMode>
<lineEnding>unix</lineEnding>
</fileSet>
</fileSets>
</sources>
</moduleSet>
</moduleSets>
<id>release</id>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<includeSiteDirectory>false</includeSiteDirectory>
<baseDirectory>apim-cli-${pom.version}</baseDirectory>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-apim-adapter</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-apis</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-apps</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-organizations</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-users</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-settings</include>
<include>com.github.axway-api-management-plus.apim-cli:apimcli-tool</include>
</includes>
<binaries>
<unpack>false</unpack>
<outputDirectory>lib</outputDirectory>
</binaries>
<sources>
<includeModuleDirectory>false</includeModuleDirectory>
<fileSets>
<fileSet>
<directory>assembly/</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>*.formatted</exclude>
<exclude>scripts/*</exclude>
<exclude>samples/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/lib</outputDirectory>
<includes>
<include>*.xml</include>
</includes>
<excludes>
<exclude>cacheConfig.xml</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>assembly/scripts</directory>
<outputDirectory>/scripts</outputDirectory>
<includes>
<include>*.sh</include>
<include>*.bat</include>
</includes>
<fileMode>0755</fileMode>
<lineEnding>unix</lineEnding>
</fileSet>
</fileSets>
</sources>
</moduleSet>
</moduleSets>

<fileSets>
<fileSet>
<directory>${project.basedir}/..</directory>
<outputDirectory></outputDirectory>
<includes>
<include>README.md</include>
<include>LICENSE</include>
<include>CHANGELOG.md</include>
</includes>
</fileSet>
</fileSets>
<fileSets>
<fileSet>
<directory>${project.basedir}/..</directory>
<outputDirectory></outputDirectory>
<includes>
<!--include>README.md</include-->
<include>LICENSE</include>
<!--include>CHANGELOG.md</include-->
</includes>
</fileSet>
</fileSets>

</assembly>
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,14 @@ public void testConsoleExportGlobalQuota() throws AppException {
APIManagerConfig apiManagerConfig = new APIManagerConfig();
exporter.export(apiManagerConfig);
}

@Test
public void testConsoleExportCustomProperties() throws AppException {
String[] args = {"-h", "localhost", "-c", "manager-config.json", "-type", "CUSTOMPROPERTIES"};
APIManagerSetupExportParams params = (APIManagerSetupExportParams) APIManagerSetupExportCLIOptions.create(args).getParams();
ExportResult result = new ExportResult();
APIManagerSetupResultHandler exporter = APIManagerSetupResultHandler.create(ResultHandler.CONSOLE_EXPORTER, params, result);
APIManagerConfig apiManagerConfig = new APIManagerConfig();
exporter.export(apiManagerConfig);
}
}

0 comments on commit 38584a1

Please sign in to comment.