File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
integrationTest/kotlin/com/cosmotech/dataset/service
main/kotlin/com/cosmotech/dataset/service Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ class DatasetServiceIntegrationTest : CsmRedisTestBase() {
351351
352352 logger.info(" should find all datasets and assert there are $numberOfDatasets " )
353353 var datasetList = datasetApiService.findAllDatasets(organizationSaved.id!! , null , null )
354- assertEquals(numberOfDatasets + 1 , datasetList.size)
354+ assertEquals(numberOfDatasets, datasetList.size)
355355
356356 logger.info(" should find all datasets and assert it equals defaultPageSize: $defaultPageSize " )
357357 datasetList = datasetApiService.findAllDatasets(organizationSaved.id!! , 0 , null )
@@ -363,7 +363,7 @@ class DatasetServiceIntegrationTest : CsmRedisTestBase() {
363363
364364 logger.info(" should find all solutions and assert it returns the second / last page" )
365365 datasetList = datasetApiService.findAllDatasets(organizationSaved.id!! , 1 , expectedSize)
366- assertEquals(numberOfDatasets - expectedSize + 1 , datasetList.size)
366+ assertEquals(numberOfDatasets - expectedSize, datasetList.size)
367367 }
368368
369369 @Test
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ class DatasetServiceImpl(
155155 val currentUser = getCurrentAccountIdentifier(this .csmPlatformProperties)
156156 datasetRepository.findByOrganizationId(organizationId, currentUser, it).toList()
157157 } else {
158- datasetRepository.findAll( it).toList()
158+ datasetRepository.findByOrganizationIdNoSecurity(organizationId, it).toList()
159159 }
160160 }
161161 } else {
@@ -164,7 +164,7 @@ class DatasetServiceImpl(
164164 val currentUser = getCurrentAccountIdentifier(this .csmPlatformProperties)
165165 datasetRepository.findByOrganizationId(organizationId, currentUser, pageable).toList()
166166 } else {
167- datasetRepository.findAll( pageable).toList()
167+ datasetRepository.findByOrganizationIdNoSecurity(organizationId, pageable).toList()
168168 }
169169 }
170170 result.forEach { it.security = updateSecurityVisibility(it).security }
You can’t perform that action at this time.
0 commit comments