File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
main/kotlin/com/opendatamask/service
test/kotlin/com/opendatamask/controller Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -60,13 +60,15 @@ class DestinationSchemaService {
6060 ConnectionType .MONGODB , ConnectionType .MONGODB_COSMOS -> " mixed"
6161 ConnectionType .FILE ->
6262 if (sourceType.equals(" mixed" , ignoreCase = true )) " TEXT" else sourceType.uppercase()
63+ ConnectionType .MYSQL ->
64+ postgresTypeMap[sourceType.lowercase()] ? : sourceType.uppercase()
6365 }
6466
6567 // Step 2: translate the portable type to the destination dialect
6668 return when (destDb) {
6769 ConnectionType .MONGODB , ConnectionType .MONGODB_COSMOS -> " mixed"
6870 ConnectionType .AZURE_SQL -> toAzureSqlTypeMap[normalized] ? : normalized
69- ConnectionType .POSTGRESQL , ConnectionType .FILE -> normalized
71+ ConnectionType .POSTGRESQL , ConnectionType .FILE , ConnectionType . MYSQL -> normalized
7072 }
7173 }
7274
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAut
1818import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest
1919import org.springframework.boot.test.mock.mockito.MockBean
2020import org.springframework.http.MediaType
21- import org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.user
21+ import org.springframework.security.test.context.support.WithMockUser
2222import org.springframework.test.context.ActiveProfiles
2323import org.springframework.test.web.servlet.MockMvc
2424import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*
@@ -75,6 +75,7 @@ class WorkspaceInheritanceControllerTest {
7575 }
7676
7777 @Test
78+ @WithMockUser(username = " testuser" )
7879 fun `POST children creates child workspace and returns 201` () {
7980 val response = makeWorkspaceResponse(id = 5L , name = " child" , parentId = 1L )
8081 whenever(workspaceService.createWorkspace(any<WorkspaceRequest >(), any<Long >())).thenReturn(response)
@@ -87,7 +88,6 @@ class WorkspaceInheritanceControllerTest {
8788 )
8889 mockMvc.perform(
8990 post(" /api/workspaces/1/children" )
90- .with (user(" testuser" ).roles(" USER" ))
9191 .contentType(MediaType .APPLICATION_JSON )
9292 .content(body)
9393 )
You can’t perform that action at this time.
0 commit comments