Skip to content

Commit

Permalink
Scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Dumas committed Oct 16, 2024
1 parent 68bd09f commit a499556
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ final case class FileId(id: IdSegmentRef, project: ProjectRef) {
def expandRef(fetchContext: ProjectRef => IO[ProjectContext]): IO[ResourceRef] =
fetchContext(project).flatMap { pc =>
iriExpander(id.value, pc).map { iri =>
(iri, pc)
id match {
case IdSegmentRef.Latest(_) => ResourceRef.Latest(iri)
case IdSegmentRef.Revision(_, rev) => ResourceRef.Revision(iri, rev)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package ch.epfl.bluebrain.nexus.delta.plugins.storage.files

class RemoteStorageFilesSpec {

}
class RemoteStorageFilesSpec {}
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ class DiskStorageAccessSuite extends NexusSuite {
}

test("fail when volume does not exist") {
val volume = AbsolutePath(Path.of("/random", genString())).rightValue
val volume = AbsolutePath(Path.of("/random", genString())).rightValue
val expectedError = StorageNotAccessible(s"Volume '$volume' does not exist.")
checkVolumeExists(volume).interceptEquals(expectedError)
}

test("fail when volume is not a directory") {
val volume = AbsolutePath(Files.createTempFile(genString(), genString())).rightValue
val volume = AbsolutePath(Files.createTempFile(genString(), genString())).rightValue
val expectedError = StorageNotAccessible(s"Volume '$volume' is not a directory.")
checkVolumeExists(volume).interceptEquals(expectedError)
}

test("fail when volume does not have write access") {
val volume = AbsolutePath(Files.createTempDirectory("disk-not-access")).rightValue
val volume = AbsolutePath(Files.createTempDirectory("disk-not-access")).rightValue
volume.value.toFile.setReadOnly()
val expectedError = StorageNotAccessible(s"Volume '$volume' does not have write access.")
checkVolumeExists(volume).interceptEquals(expectedError)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import ch.epfl.bluebrain.nexus.testkit.mu.NexusSuite
import io.laserdisc.pure.s3.tagless.S3AsyncClientOp
import munit.AnyFixture

class S3StorageAccessSuite extends NexusSuite
with LocalStackS3StorageClient.Fixture with S3Helpers {
class S3StorageAccessSuite extends NexusSuite with LocalStackS3StorageClient.Fixture with S3Helpers {

override def munitFixtures: Seq[AnyFixture[_]] = List(localStackS3Client)

Expand All @@ -29,4 +28,3 @@ class S3StorageAccessSuite extends NexusSuite
s3Access.checkBucketExists(genString()).intercept[StorageNotAccessible]
}
}

0 comments on commit a499556

Please sign in to comment.