fix integration test (#1615)
* upgrade to spring boot 1.5.2 * add full update to REST API * modify ratings controller * upgrade herold * fix integration test * fix integration test * minor fix * fix integration test * fix integration test * minor cleanup
This commit is contained in:
parent
a5de78c2b2
commit
cc276589ec
|
@ -1,3 +1,5 @@
|
|||
drop table if exists USERS;
|
||||
|
||||
create table USERS(
|
||||
ID int not null AUTO_INCREMENT,
|
||||
NAME varchar(100) not null,
|
||||
|
|
|
@ -63,4 +63,4 @@ public class SpringBootApplicationIntegrationTest {
|
|||
mockMvc.perform(MockMvcRequestBuilders.get("/entity/findbyversion").header("Version", "1.0.0")).andExpect(MockMvcResultMatchers.status().isOk()).andExpect(MockMvcResultMatchers.content().contentType(contentType))
|
||||
.andExpect(jsonPath("$.id", equalTo(1)));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
Insert into Foo values(1,'Foo_Name');
|
||||
--insert into Foo values(1,'Foo_Name');
|
|
@ -1,8 +1,8 @@
|
|||
jdbc.driverClassName=org.h2.Driver
|
||||
jdbc.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
|
||||
jdbc.username=sa
|
||||
jdbc.password=sa
|
||||
jdbc.user=sa
|
||||
jdbc.pass=sa
|
||||
|
||||
hibernate.dialect=org.hibernate.dialect.H2Dialect
|
||||
hibernate.show_sql=true
|
||||
hibernate.hbm2ddl.auto=create-drop
|
||||
hibernate.hbm2ddl.auto=create-drop
|
||||
|
|
|
@ -21,10 +21,11 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
|||
import org.springframework.web.context.WebApplicationContext;
|
||||
|
||||
import com.baeldung.spring.web.config.ApplicationConfig;
|
||||
import com.baeldung.spring.web.config.WebConfig;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@WebAppConfiguration
|
||||
@ContextConfiguration(classes = { ApplicationConfig.class })
|
||||
@ContextConfiguration(classes = { ApplicationConfig.class, WebConfig.class })
|
||||
public class GreetControllerIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
|
|
Loading…
Reference in New Issue