Skip to content

Commit

Permalink
Adapt all ScopeInitialization related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olivergrabinski committed Oct 3, 2023
1 parent f8a05ff commit ba94044
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package ch.epfl.bluebrain.nexus.delta.routes
import akka.http.scaladsl.model.StatusCodes
import akka.http.scaladsl.model.headers.OAuth2BearerToken
import akka.http.scaladsl.server.Route
import ch.epfl.bluebrain.nexus.delta.kernel.effect.migration._
import ch.epfl.bluebrain.nexus.delta.kernel.utils.{UUIDF, UrlUtils}
import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.contexts
import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclSimpleCheck
Expand Down Expand Up @@ -35,7 +36,7 @@ class OrganizationsRoutesSpec extends BaseRouteSpec with IOFromMap {

private val aclChecker = AclSimpleCheck().accepted
private val aopd = new OwnerPermissionsScopeInitialization(
aclChecker.append,
acl => aclChecker.append(acl),
Set(orgsPermissions.write, orgsPermissions.read)
)
private lazy val orgs = OrganizationsImpl(Set(aopd), config, xas)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import ch.epfl.bluebrain.nexus.delta.sdk.{ConfigFixtures, Defaults}
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Identity.{Subject, User}
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Label
import ch.epfl.bluebrain.nexus.delta.sourcing.postgres.DoobieScalaTestFixture
import ch.epfl.bluebrain.nexus.testkit.{IOFixedClock, IOValues, TestHelpers}
import ch.epfl.bluebrain.nexus.testkit.ce.CatsIOValues
import ch.epfl.bluebrain.nexus.testkit.{IOFixedClock, TestHelpers}
import monix.bio.UIO
import monix.execution.Scheduler
import org.scalatest.Inspectors
Expand All @@ -27,7 +28,7 @@ class BlazegraphScopeInitializationSpec
with Matchers
with Inspectors
with IOFixedClock
with IOValues
with CatsIOValues
with TestHelpers
with ConfigFixtures
with Fixtures {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import ch.epfl.bluebrain.nexus.delta.sourcing.model.Identity.{Subject, User}
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Label
import ch.epfl.bluebrain.nexus.delta.sourcing.postgres.DoobieScalaTestFixture
import ch.epfl.bluebrain.nexus.delta.sourcing.stream.pipes.{DefaultLabelPredicates, SourceAsText}
import ch.epfl.bluebrain.nexus.testkit.{EitherValuable, IOValues, TestHelpers}
import ch.epfl.bluebrain.nexus.testkit.ce.CatsIOValues
import ch.epfl.bluebrain.nexus.testkit.{EitherValuable, TestHelpers}
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike
import org.scalatest.{Inspectors, OptionValues}
Expand All @@ -29,7 +30,7 @@ class ElasticSearchScopeInitializationSpec
with AnyWordSpecLike
with Matchers
with Inspectors
with IOValues
with CatsIOValues
with OptionValues
with EitherValuable
with TestHelpers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import ch.epfl.bluebrain.nexus.delta.sdk.{ConfigFixtures, Defaults}
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Identity.{Subject, User}
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Label
import ch.epfl.bluebrain.nexus.delta.sourcing.postgres.DoobieScalaTestFixture
import ch.epfl.bluebrain.nexus.testkit.{IOFixedClock, IOValues, TestHelpers}
import ch.epfl.bluebrain.nexus.testkit.ce.CatsIOValues
import ch.epfl.bluebrain.nexus.testkit.{IOFixedClock, TestHelpers}
import monix.bio.IO
import monix.execution.Scheduler
import org.scalatest.matchers.should.Matchers
Expand All @@ -26,7 +27,7 @@ import java.util.UUID
class StorageScopeInitializationSpec
extends DoobieScalaTestFixture
with Matchers
with IOValues
with CatsIOValues
with IOFixedClock
with RemoteContextResolutionFixture
with ConfigFixtures
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package ch.epfl.bluebrain.nexus.delta.sdk.organizations

import ch.epfl.bluebrain.nexus.delta.kernel.search.Pagination.FromPagination
import ch.epfl.bluebrain.nexus.delta.kernel.utils.UUIDF
import ch.epfl.bluebrain.nexus.delta.sdk.generators.OrganizationGen.{organization, resourceFor}
import ch.epfl.bluebrain.nexus.delta.sdk.model.ResourceF
import ch.epfl.bluebrain.nexus.delta.kernel.search.Pagination.FromPagination
import ch.epfl.bluebrain.nexus.delta.sdk.model.search.ResultEntry.UnscoredResultEntry
import ch.epfl.bluebrain.nexus.delta.sdk.model.search.SearchParams.OrganizationSearchParams
import ch.epfl.bluebrain.nexus.delta.sdk.model.search.SearchResults.UnscoredSearchResults
Expand All @@ -13,7 +13,8 @@ import ch.epfl.bluebrain.nexus.delta.sdk.{ConfigFixtures, ScopeInitializationLog
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Identity.Subject
import ch.epfl.bluebrain.nexus.delta.sourcing.model.{Identity, Label}
import ch.epfl.bluebrain.nexus.delta.sourcing.postgres.DoobieScalaTestFixture
import ch.epfl.bluebrain.nexus.testkit.{IOFixedClock, IOValues}
import ch.epfl.bluebrain.nexus.testkit.IOFixedClock
import ch.epfl.bluebrain.nexus.testkit.ce.CatsIOValues
import monix.bio.UIO
import monix.execution.Scheduler
import org.scalatest.matchers.should.Matchers
Expand All @@ -25,7 +26,7 @@ import java.util.UUID
class OrganizationsImplSpec
extends DoobieScalaTestFixture
with Matchers
with IOValues
with CatsIOValues
with IOFixedClock
with CancelAfterFailure
with OptionValues
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import ch.epfl.bluebrain.nexus.delta.sdk.permissions.Permissions
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Identity.User
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Label
import ch.epfl.bluebrain.nexus.delta.sourcing.postgres.DoobieScalaTestFixture
import ch.epfl.bluebrain.nexus.testkit.{IOFixedClock, IOValues, TestHelpers}
import ch.epfl.bluebrain.nexus.testkit.ce.CatsIOValues
import ch.epfl.bluebrain.nexus.testkit.{IOFixedClock, TestHelpers}
import monix.bio.UIO
import org.scalatest.matchers.should.Matchers

class OwnerPermissionsScopeInitializationSpec
extends DoobieScalaTestFixture
with Matchers
with IOValues
with CatsIOValues
with IOFixedClock
with TestHelpers
with ConfigFixtures {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package ch.epfl.bluebrain.nexus.delta.sdk.projects

import ch.epfl.bluebrain.nexus.delta.kernel.search.Pagination.FromPagination
import ch.epfl.bluebrain.nexus.delta.kernel.utils.UUIDF
import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.nxv
import ch.epfl.bluebrain.nexus.delta.sdk.generators.ProjectGen._
import ch.epfl.bluebrain.nexus.delta.kernel.search.Pagination.FromPagination
import ch.epfl.bluebrain.nexus.delta.sdk.model.search.SearchParams.ProjectSearchParams
import ch.epfl.bluebrain.nexus.delta.sdk.model.search.SearchResults
import ch.epfl.bluebrain.nexus.delta.sdk.model.{BaseUri, ResourceF}
Expand All @@ -17,7 +17,8 @@ import ch.epfl.bluebrain.nexus.delta.sdk.{ConfigFixtures, ScopeInitializationLog
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Identity.Subject
import ch.epfl.bluebrain.nexus.delta.sourcing.model.{Identity, Label, ProjectRef}
import ch.epfl.bluebrain.nexus.delta.sourcing.postgres.DoobieScalaTestFixture
import ch.epfl.bluebrain.nexus.testkit.{IOFixedClock, IOValues}
import ch.epfl.bluebrain.nexus.testkit.IOFixedClock
import ch.epfl.bluebrain.nexus.testkit.ce.CatsIOValues
import monix.bio.{IO, UIO}
import org.scalatest.matchers.should.Matchers
import org.scalatest.{CancelAfterFailure, OptionValues}
Expand All @@ -27,7 +28,7 @@ import java.util.UUID
class ProjectsImplSpec
extends DoobieScalaTestFixture
with Matchers
with IOValues
with CatsIOValues
with IOFixedClock
with CancelAfterFailure
with OptionValues
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import ch.epfl.bluebrain.nexus.delta.sdk.{ConfigFixtures, Defaults}
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Identity.{Subject, User}
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Label
import ch.epfl.bluebrain.nexus.delta.sourcing.postgres.DoobieScalaTestFixture
import ch.epfl.bluebrain.nexus.testkit.{IOFixedClock, IOValues, TestHelpers}
import ch.epfl.bluebrain.nexus.testkit.ce.CatsIOValues
import ch.epfl.bluebrain.nexus.testkit.{IOFixedClock, TestHelpers}
import monix.bio.IO
import org.scalatest.matchers.should.Matchers

Expand All @@ -26,7 +27,7 @@ import java.util.UUID
class ResolverScopeInitializationSpec
extends DoobieScalaTestFixture
with Matchers
with IOValues
with CatsIOValues
with IOFixedClock
with TestHelpers
with ConfigFixtures {
Expand Down

0 comments on commit ba94044

Please sign in to comment.