forked from karatelabs/karate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SslTest.java
39 lines (32 loc) · 1.03 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.springframework.context.ConfigurableApplicationContext;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
/**
*
* @author pthomas3
*/
class SslTest {
static ConfigurableApplicationContext context;
@BeforeAll
static void beforeAll() {
context = TestService.start();
}
@Test
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.getFailCount() == 0, results.getErrorMessages());
}
@AfterAll
static void afterAll() {
TestService.stop(context);
}
}