-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
package org.molgenis.armadillo;
import org.junit.jupiter.api.Test;
import org.molgenis.armadillo.controller.ArmadilloControllerTestBase;
import org.molgenis.armadillo.controller.CurrentUserController;
import org.molgenis.armadillo.storage.ArmadilloStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.annotation.Import;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
@WebMvcTest(CurrentUserController.class)
@Import({TestSecurityConfig.class})
public class ActuatorEndpointTest extends ArmadilloControllerTestBase {
@MockBean
ArmadilloStorageService armadilloStorage;
@Autowired
private MockMvc mockMvc;
@Test
@WithMockUser(roles = "SU")
public void testActuatorEndpoint() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.get("/actuator"))
.andExpect(MockMvcResultMatchers.status().isOk());
}
}