Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions opendj-server-legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,6 @@
<showDeprecation>false</showDeprecation>
<showWarnings>false</showWarnings>
<testCompilerArgument>-nowarn</testCompilerArgument>
<testExcludes>
<testExclude>**/org/opends/server/snmp/**</testExclude>
</testExcludes>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -1260,9 +1257,6 @@
<!-- <enableProcessChecker>all</enableProcessChecker>-->
<forkedProcessTimeoutInSeconds>2400</forkedProcessTimeoutInSeconds>
<forkedProcessExitTimeoutInSeconds>120</forkedProcessExitTimeoutInSeconds>
<excludes>
<exclude>org/opends/server/snmp/**</exclude>
</excludes>
<includes>
<include>**/Test*.java</include>
<include>**/*Test.java</include>
Expand All @@ -1289,7 +1283,7 @@
<org.opends.server.BuildRoot>${basedir}</org.opends.server.BuildRoot>
<org.opends.server.BuildDir>${project.build.directory}</org.opends.server.BuildDir>
<org.opends.test.replicationDbImpl>LOG</org.opends.test.replicationDbImpl>
<jvmarg value="-Dorg.opends.server.snmp.opendmk=${opendmk.lib.dir}" />
<org.opends.server.snmp.opendmk>${opendmk.lib.dir}</org.opends.server.snmp.opendmk>
<org.opends.server.CleanupDirectories>true</org.opends.server.CleanupDirectories>
<org.opends.test.suppressOutput>true</org.opends.test.suppressOutput>
<org.opends.test.pauseOnFailure>false</org.opends.test.pauseOnFailure>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*
* Copyright 2008 Sun Microsystems, Inc.
* Portions copyright 2014-2016 ForgeRock AS.
* Portions copyright 2026 3A Systems, LLC
*/
package org.opends.server.snmp;

Expand Down Expand Up @@ -139,7 +140,7 @@ protected SnmpUsmPeer getSnmpV3Peer(int port)

try
{
String host = InetAddress.getLocalHost().getCanonicalHostName();
String host = "localhost";
SnmpOidTableSupport oidTable = new DIRECTORY_SERVER_MIBOidTable();
SnmpOid.setSnmpOidTable(oidTable);

Expand All @@ -166,7 +167,7 @@ protected SnmpPeer getSnmpV2Peer(int port)

try
{
String host = InetAddress.getLocalHost().getCanonicalHostName();
String host = "localhost";
SnmpOidTableSupport oidTable = new DIRECTORY_SERVER_MIBOidTable();
SnmpOid.setSnmpOidTable(oidTable);
return new SnmpPeer(host, port);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*
* Copyright 2008 Sun Microsystems, Inc.
* Portions Copyright 2014-2016 ForgeRock AS.
* Portions Copyright 2024-2026 3A Systems, LLC
*/
package org.opends.server.snmp;

Expand All @@ -34,7 +35,7 @@
/**
* SNMP tests.
*/
@Test(enabled=false, groups = {"precommit", "snmp"}, sequential = true)
@Test(groups = {"precommit", "snmp"}, sequential = true)
public class SNMPSyncManagerV2AccessTest extends SNMPConnectionManager {

@BeforeClass
Expand All @@ -60,7 +61,7 @@ Object[][] listAttributes() {
{"dsSlaveHits"}};
}

@Test(enabled=false,dataProvider = "listAttributes")
@Test(dataProvider = "listAttributes")
public void checkAttribute(String attributeName) {

// get the SNMP peer agent
Expand All @@ -76,7 +77,7 @@ public void checkAttribute(String attributeName) {
new SnmpParameters();

// Set to the allowed the community string
params.setRdCommunity("OpenDS@OpenDS");
params.setRdCommunity("OpenDJ@OpenDJ");

// The newly created parameter must be associated to the agent.
//
Expand Down Expand Up @@ -163,17 +164,17 @@ Object[][] listCommunities() {
return new Object[][]{
{"public", false},
{"private", false},
{"OpenDS@OpenDS", true},
{"OpenDJ@OpenDJ", true},
{"dummy", false},
{"", false}};
}

@Test(enabled = false,dataProvider = "listCommunities")
@Test(dataProvider = "listCommunities")
public void checkCommunity(String community, boolean expectedResult) {

try {

String host = InetAddress.getLocalHost().getCanonicalHostName();
String host = "localhost";
// Initialize the SNMP Manager API.
// Specify the OidTable containing all the MIB II knowledge.
// Use the OidTable generated by mibgen when compiling MIB II.
Expand Down
Loading