Add a basic startup test of the app

This commit is contained in:
2019-02-18 21:10:13 +01:00
parent dfe1e08dc7
commit d2d5d7f38a

View File

@@ -0,0 +1,31 @@
package de.financer;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = FinancerApplication.class)
@AutoConfigureMockMvc
@TestPropertySource(
locations = "classpath:application-integrationtest.properties")
public class FinancerApplicationBootTest {
@Autowired
private MockMvc mockMvc;
@Test
public void test_appBoots() {
// Nothing to do in this test as we just want to startup the app
// to make sure that spring, flyway and hibernate all work
// as expected even after changes
// While this slightly increases build time it's an easy and safe
// way to ensure that the app can start
Assert.assertTrue(true);
}
}