Skip to content

Commit 6090f5c

Browse files
authored
[#2523] Delete deprecated test (#2540)
Remove faulty IOException test for missing summary.json The test fails when frontend/public contains report data, which gets included in templateZip.zip during the build process. Let's remove generateReposReport_isOnlyTextRefreshedTrueButInvalidPath_throwsIoException Since the validation logic is straightforward, setting up additional test setup is not worth the complexity.
1 parent 6bdbf2e commit 6090f5c

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/test/java/reposense/report/ReportGeneratorTest.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import java.util.List;
1717

1818
import org.junit.jupiter.api.AfterEach;
19-
import org.junit.jupiter.api.Assertions;
2019
import org.junit.jupiter.api.Test;
2120

2221
import reposense.model.AuthorBlurbMap;
@@ -70,25 +69,6 @@ void generateReposReport_isOnlyTextRefreshedTrue_success() throws Exception {
7069
assertTrue(compareFileContents(INTRO_MD_PATH, TEST_INTRO_MD_PATH));
7170
}
7271

73-
@Test
74-
void generateReposReport_isOnlyTextRefreshedTrueButInvalidPath_throwsIoException() throws Exception {
75-
ReportGenerator reportGenerator = new ReportGenerator();
76-
TimeUtil.startTimer();
77-
RepoBlurbMap repoBlurbMap = new RepoBlurbMap();
78-
repoBlurbMap.withRecord("https://github.com/reposense/testrepo-Delta/tree/master", "This is a test blurb");
79-
AuthorBlurbMap authorBlurbMap = new AuthorBlurbMap();
80-
ChartBlurbMap chartBlurbMap = new ChartBlurbMap();
81-
Assertions.assertThrows(
82-
IOException.class, () -> reportGenerator.generateReposReport(List.of(), ASSETS_PATH.toString(),
83-
ASSETS_PATH.toString(), new ReportConfiguration(), REPORT_GENERATED_TIME,
84-
LocalDateTime.parse("2025-02-16T00:00:00", DateTimeFormatter.ofPattern(GITHUB_API_DATE_FORMAT)),
85-
LocalDateTime.parse("2025-03-16T23:59:59", DateTimeFormatter.ofPattern(GITHUB_API_DATE_FORMAT)),
86-
false, false, 4, 12, TimeUtil::getElapsedTime,
87-
ZoneId.of("Asia/Singapore"), false, false, 0.51,
88-
repoBlurbMap, authorBlurbMap, chartBlurbMap, false, true)
89-
);
90-
}
91-
9272
@AfterEach
9373
void reset() throws IOException {
9474
Files.copy(ORIGINAL_SUMMARY_JSON_PATH, SUMMARY_JSON_PATH, StandardCopyOption.REPLACE_EXISTING);

0 commit comments

Comments
 (0)