Skip to content

Commit

Permalink
Merge branch 'main' into AJ-1277_delete-records-capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
mspector authored Sep 27, 2024
2 parents 977b59f + 8a7e6de commit 0342944
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ControllerConfig {
*/
@SuppressWarnings("java:S5122") // we explicitly want to allow * for origins
@Bean
@Profile("local-cors")
@Profile({"local-cors", "control-plane"})
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurer() {
@Override
Expand Down
2 changes: 2 additions & 0 deletions service/src/main/resources/application-bee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ workspacemanagerurl: https://workspace.${beename}.bee.envs-terra.bio
leoUrl: https://leonardo.${beename}.bee.envs-terra.bio
rawlsUrl: https://rawls.${beename}.bee.envs-terra.bio

# Enable preview of control plane apis
controlPlanePreview: "on"
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

import java.util.UUID;
import org.databiosphere.workspacedataservice.annotations.SingleTenant;
import org.databiosphere.workspacedataservice.shared.model.WorkspaceId;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.web.servlet.MvcResult;

/**
Expand All @@ -16,9 +20,14 @@
*
* <p>See also CorsLocalMockMvcTest for testing CORS behavior in the "local" Spring profile
*/
@ActiveProfiles(
value = {"data-plane"},
inheritProfiles = false)
class CorsLiveMockMvcTest extends MockMvcTestBase {
private static final String versionId = "v0.2";

@MockBean @SingleTenant WorkspaceId workspaceId;

@ParameterizedTest(name = "CORS response headers for non-local profile to {0} should be correct")
@ValueSource(
strings = {
Expand Down

0 comments on commit 0342944

Please sign in to comment.