Skip to content

Commit

Permalink
NMS-16986 : Updated related test to fix build issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwajahatabbasi committed Jan 8, 2025
1 parent 4c37904 commit eb0ea75
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@

import org.junit.Test;
import org.opennms.core.test.MockLogAppender;
import org.opennms.netmgt.dao.mock.MockIpInterfaceDao;
import org.opennms.systemreport.SystemReportPlugin;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.test.util.ReflectionTestUtils;

public class SystemReportPluginIT {
private SystemReportPlugin m_javaReportPlugin = new JavaReportPlugin();
Expand All @@ -47,10 +49,14 @@ public void testJavaReportPlugin() {

@Test
public void testOSPlugin() {
ReflectionTestUtils.setField(m_osReportPlugin,"m_ipInterfaceDao",new MockIpInterfaceDao());
final Map<String, org.springframework.core.io.Resource> entries = m_osReportPlugin.getEntries();
assertTrue(entries.containsKey("Architecture"));
assertTrue(entries.containsKey("Name"));
assertTrue(entries.containsKey("Distribution"));
assertTrue(entries.containsKey("Host Name"));
assertTrue(entries.containsKey("Ip Address"));
assertTrue(entries.containsKey("HTTP(S) ports"));
}

private String getResourceText(final org.springframework.core.io.Resource r) {
Expand Down

0 comments on commit eb0ea75

Please sign in to comment.