Skip to content

Commit

Permalink
Merge pull request #401 from silk-framework/fix/S3Deletion-CMEM-3058
Browse files Browse the repository at this point in the history
Add tests for CMEM-3058
  • Loading branch information
andreas-schultz authored Oct 28, 2020
2 parents 4247ece + 3ca35a4 commit 2a85679
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ abstract class PerProjectResourceRepositoryTest extends ResourceRepositoryTest {
it should "separate files from different projects" in {
repository.sharedResources mustBe false

val resourceA = repository.get("projectA").get("resource")
val resourceB = repository.get("projectB").get("resource")
val resourceName = "resource"
val AManager = repository.get("projectA")
val BManager = repository.get("projectB")
val resourceA = AManager.get(resourceName)
val resourceB = BManager.get(resourceName)

resourceA.exists mustBe false
resourceB.exists mustBe false
Expand All @@ -24,8 +27,11 @@ abstract class PerProjectResourceRepositoryTest extends ResourceRepositoryTest {
resourceA.loadAsString mustBe "A"
resourceB.loadAsString mustBe "B"

resourceA.delete()
AManager.delete(resourceName)
resourceA.exists mustBe false
resourceB.exists mustBe true
resourceB.delete()
resourceB.exists mustBe false
}

it should "delete all project resources if requested" in {
Expand Down

0 comments on commit 2a85679

Please sign in to comment.