Skip to content
Snippets Groups Projects
Commit 65391007 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4939 Added WithMockUser to ITCases

parent e770ea4a
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,7 @@ import org.junit.jupiter.api.Test; ...@@ -30,6 +30,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestProperties; import org.springframework.boot.autoconfigure.data.rest.RepositoryRestProperties;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.ResultActions; import org.springframework.test.web.servlet.ResultActions;
...@@ -38,6 +39,7 @@ import lombok.SneakyThrows; ...@@ -38,6 +39,7 @@ import lombok.SneakyThrows;
@ITCase @ITCase
@AutoConfigureMockMvc @AutoConfigureMockMvc
@WithMockUser
class ApiRootITCase { class ApiRootITCase {
@Autowired @Autowired
......
...@@ -32,6 +32,7 @@ import org.springframework.boot.autoconfigure.data.rest.RepositoryRestProperties ...@@ -32,6 +32,7 @@ import org.springframework.boot.autoconfigure.data.rest.RepositoryRestProperties
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.data.mongodb.core.MongoOperations; import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.ResultActions; import org.springframework.test.web.servlet.ResultActions;
...@@ -40,6 +41,7 @@ import lombok.SneakyThrows; ...@@ -40,6 +41,7 @@ import lombok.SneakyThrows;
@DataITCase @DataITCase
@AutoConfigureMockMvc @AutoConfigureMockMvc
@WithMockUser
class ConfigurationParameterITCase { class ConfigurationParameterITCase {
@Autowired @Autowired
......
...@@ -7,6 +7,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -7,6 +7,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import de.ozgcloud.common.test.DataITCase; import de.ozgcloud.common.test.DataITCase;
...@@ -14,6 +15,7 @@ import lombok.SneakyThrows; ...@@ -14,6 +15,7 @@ import lombok.SneakyThrows;
@DataITCase @DataITCase
@AutoConfigureMockMvc @AutoConfigureMockMvc
@WithMockUser
class AdminEnvironmentITCase { class AdminEnvironmentITCase {
@Autowired @Autowired
private MockMvc mockMvc; private MockMvc mockMvc;
......
...@@ -9,10 +9,12 @@ import org.junit.jupiter.api.Test; ...@@ -9,10 +9,12 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.config.environment.Environment; import org.springframework.cloud.config.environment.Environment;
import org.springframework.cloud.config.server.environment.EnvironmentRepository; import org.springframework.cloud.config.server.environment.EnvironmentRepository;
import org.springframework.security.test.context.support.WithMockUser;
import de.ozgcloud.common.test.DataITCase; import de.ozgcloud.common.test.DataITCase;
@DataITCase @DataITCase
@WithMockUser
class AdminEnvironmentRepositoryITCase { class AdminEnvironmentRepositoryITCase {
@Autowired @Autowired
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment