Skip to content

Commit

Permalink
MID-8842 ninja - removed obsolete test files
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Jul 28, 2023
1 parent e1010d2 commit 620bc6c
Show file tree
Hide file tree
Showing 34 changed files with 18 additions and 5,759 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ interface StreamValidator {
* or for Native repository, but {@link #clearMidpointTestDatabase(ApplicationContext)} can be used in the preExecute block.
*/
default void setupMidpointHome() throws IOException {
FileUtils.deleteDirectory(TARGET_HOME);

File baseHome = new File(RESOURCES_DIRECTORY, "midpoint-home");

FileUtils.copyDirectory(baseHome, TARGET_HOME);

// This tells Ninja to use the right config XML for Native repo.
// Ninja tests don't support test.config.file property as other midPoint tests.
String testConfigFile = System.getProperty("test.config.file");
if (testConfigFile != null) {
System.setProperty(MidpointConfiguration.MIDPOINT_CONFIG_FILE_PROPERTY, testConfigFile);
}
// FileUtils.deleteDirectory(TARGET_HOME);
//
// File baseHome = new File(RESOURCES_DIRECTORY, "midpoint-home");
//
// FileUtils.copyDirectory(baseHome, TARGET_HOME);
//
// // This tells Ninja to use the right config XML for Native repo.
// // Ninja tests don't support test.config.file property as other midPoint tests.
// String testConfigFile = System.getProperty("test.config.file");
// if (testConfigFile != null) {
// System.setProperty(MidpointConfiguration.MIDPOINT_CONFIG_FILE_PROPERTY, testConfigFile);
// }
}

default void clearMidpointTestDatabase(ApplicationContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void test100VerifyFiles() throws Exception {

when();

VerifyResult result = (VerifyResult) executeTest(NOOP_STREAM_VALIDATOR, EMPTY_STREAM_VALIDATOR,
MainResult mainResult = executeTest(NOOP_STREAM_VALIDATOR, EMPTY_STREAM_VALIDATOR,
"-v",
"-m", getMidpointHome(),
"verify",
Expand All @@ -63,6 +63,8 @@ public void test100VerifyFiles() throws Exception {

then();

VerifyResult result = (VerifyResult) mainResult.getObject();

Assertions.assertThat(result).isNotNull();
Assertions.assertThat(result.getItemPriorityCount(UpgradePriority.OPTIONAL)).isEqualTo(1L);

Expand Down Expand Up @@ -134,14 +136,16 @@ public void test300VerifyObjects() throws Exception {

when();

VerifyResult result = (VerifyResult) executeTest(NOOP_STREAM_VALIDATOR, EMPTY_STREAM_VALIDATOR,
MainResult mainResult = executeTest(NOOP_STREAM_VALIDATOR, EMPTY_STREAM_VALIDATOR,
"-v",
"-m", getMidpointHome(),
"verify",
"--report-style", "csv",
"--overwrite",
"--output", OUTPUT.getPath());

VerifyResult result = (VerifyResult) mainResult.getObject();

Assertions.assertThat(result).isNotNull();
Assertions.assertThat(result.getItemPriorityCount(UpgradePriority.OPTIONAL)).isEqualTo(1L);

Expand Down
33 changes: 0 additions & 33 deletions tools/ninja/src/test/resources/midpoint-home/config.xml

This file was deleted.

Binary file not shown.

This file was deleted.

36 changes: 0 additions & 36 deletions tools/ninja/src/test/resources/upgrade/midpoint-home/config.xml

This file was deleted.

0 comments on commit 620bc6c

Please sign in to comment.