forked from karatelabs/karate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSslTest.java
39 lines (32 loc) · 1.02 KB
/
SslTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package ssl;
import com.intuit.karate.Results;
import com.intuit.karate.Runner;
import org.junit.AfterClass;
import static org.junit.Assert.assertTrue;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ConfigurableApplicationContext;
/**
*
* @author pthomas3
*/
public class SslTest {
static ConfigurableApplicationContext context;
@BeforeClass
public static void beforeClass() {
context = TestService.start();
}
@Test
public void testParallel() {
int port = TestService.getPort(context);
Results results = Runner.path("classpath:ssl")
.karateEnv("mock") // skip callSingle, note that the karate-config.js copied from demo may be present
.systemProperty("jersey.ssl.port", port + "")
.parallel(1);
assertTrue(results.getErrorMessages(), results.getFailCount() == 0);
}
@AfterClass
public static void afterClass() {
TestService.stop(context);
}
}