From c99f92ef90a81fd03435970c49a2322ec52f68ad Mon Sep 17 00:00:00 2001 From: AsterITA Date: Tue, 4 Jun 2024 16:24:53 +0200 Subject: [PATCH] formatting --- .../commons/files/S3FileManagerTest.scala | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/file-manager/src/test/scala/it/pagopa/interop/commons/files/S3FileManagerTest.scala b/file-manager/src/test/scala/it/pagopa/interop/commons/files/S3FileManagerTest.scala index 8671eab..d7c8a4c 100644 --- a/file-manager/src/test/scala/it/pagopa/interop/commons/files/S3FileManagerTest.scala +++ b/file-manager/src/test/scala/it/pagopa/interop/commons/files/S3FileManagerTest.scala @@ -65,8 +65,8 @@ class S3FileManagerTest "have a single file with just one is written" in { val filesAndContent: Future[(List[String], String)] = for { - _ <- fileManager.storeBytes("testBucket", "testFolder", "testFile")("testFile".getBytes()) - files <- fileManager.listFiles("testBucket")("/testFolder") + _ <- fileManager.storeBytes("testBucket", "testFolder", "testFile")("testFile".getBytes()) + files <- fileManager.listFiles("testBucket")("/testFolder") content <- fileManager.getFile("testBucket")("/testFolder/testFile").map(new String(_)) } yield (files, content) @@ -77,10 +77,10 @@ class S3FileManagerTest "have two files, one of whom in the root dir" in { val filesAndContent: Future[(List[String], String, String)] = for { - _ <- fileManager.storeBytes("testBucket", "", "rootFile")("rootFile".getBytes()) - _ <- fileManager.storeBytes("testBucket", "testFolder", "testFile")("testFile".getBytes()) - files <- fileManager.listFiles("testBucket")("") - content <- fileManager.getFile("testBucket")("/testFolder/testFile").map(new String(_)) + _ <- fileManager.storeBytes("testBucket", "", "rootFile")("rootFile".getBytes()) + _ <- fileManager.storeBytes("testBucket", "testFolder", "testFile")("testFile".getBytes()) + files <- fileManager.listFiles("testBucket")("") + content <- fileManager.getFile("testBucket")("/testFolder/testFile").map(new String(_)) rootContent <- fileManager.getFile("testBucket")("/rootFile").map(new String(_)) } yield (files, content, rootContent) @@ -91,17 +91,17 @@ class S3FileManagerTest } "get all the files" in { val filesF: Future[Map[String, Array[Byte]]] = for { - _ <- fileManager.storeBytes("testBucket", "", "rootFile")("rootFile".getBytes()) - _ <- fileManager.storeBytes("testBucket", "testFolder", "testFile")("testFile".getBytes()) - _ <- fileManager.storeBytes("testBucket", "testFolder/nestedFolder", "nestedFile")("nestedFile".getBytes()) + _ <- fileManager.storeBytes("testBucket", "", "rootFile")("rootFile".getBytes()) + _ <- fileManager.storeBytes("testBucket", "testFolder", "testFile")("testFile".getBytes()) + _ <- fileManager.storeBytes("testBucket", "testFolder/nestedFolder", "nestedFile")("nestedFile".getBytes()) files <- fileManager.getAllFiles("testBucket")("") } yield files val files = filesF.futureValue val contentMap = files.map { case (k, v) => (k, new String(v)) } val expected = Map( - "rootFile" -> "rootFile", - "testFolder/testFile" -> "testFile", + "rootFile" -> "rootFile", + "testFolder/testFile" -> "testFile", "testFolder/nestedFolder/nestedFile" -> "nestedFile" ) assert(contentMap == expected)