Skip to content

Commit c167356

Browse files
Allow test cases to run for local environment
Update: - Skipping certificate validation while executing test cases. - Removed CertificateValidationTest file, as it is no longer required.
1 parent d7e2fba commit c167356

File tree

2 files changed

+7
-98
lines changed

2 files changed

+7
-98
lines changed

splunk/src/test/java/com/splunk/HttpCertificateValidationTest.java

Lines changed: 0 additions & 98 deletions
This file was deleted.

splunk/src/test/java/com/splunk/SDKTestCase.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.junit.After;
2020
import org.junit.Assert;
2121
import org.junit.Before;
22+
import org.junit.BeforeClass;
2223

2324
import java.io.*;
2425
import java.net.InetSocketAddress;
@@ -90,6 +91,12 @@ public static Integer getJavaVersion() {
9091
return Integer.parseInt(version);
9192
}
9293

94+
@BeforeClass
95+
public static void preClassLoadActions() {
96+
// Bypass the certification validation here.
97+
HttpService.setValidateCertificates(false);
98+
}
99+
93100
@Before
94101
public void setUp() throws Exception {
95102
// If using Charles Proxy for debugging, uncomment these lines.

0 commit comments

Comments
 (0)