-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathLibertySmokeIT.java
More file actions
32 lines (25 loc) · 976 Bytes
/
LibertySmokeIT.java
File metadata and controls
32 lines (25 loc) · 976 Bytes
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
package org.example.app;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.microshed.testing.MicroShedApplication;
import org.microshed.testing.health.Health;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
/**
* Requires an local environment which is already running at {@code localhost:9080}.
* Thus enables to decouple the life cycles of the tests and results in a smaller turnaround time.
* <p>
* Note that this is a different approach to {@link LibertyAppSmokeIT}.
*/
public class LibertySmokeIT {
private MicroShedApplication application;
@BeforeEach
void setUp() {
application = MicroShedApplication.withBaseUri("http://localhost:9080").build();
}
@Test
void testIsSystemUp() {
assertThat(application.health().status, is(Health.Status.UP));
assertThat(application.health().getCheck("test-app").status, is(Health.Status.UP));
}
}