Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxcapades committed Aug 19, 2024
1 parent eb1ffd0 commit dc3f0e5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 354 deletions.

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions lib/java/src/test/resources/log4j2.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.veupathdb.lib.s3.workspaces

import kotlinx.coroutines.runBlocking
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Nested
import org.junit.jupiter.api.Test
Expand Down Expand Up @@ -83,7 +84,7 @@ internal class S3WorkspaceFactoryTest {
`when`(bucket.objects).thenReturn(objects)
`when`(objects.contains("12345678901234561234567890123456/.workspace")).thenReturn(false)

assertNull(S3WorkspaceFactory(client, "hello-world")[id])
assertNull(runBlocking { S3WorkspaceFactory(client, "hello-world").get(id) })
}
}

Expand All @@ -107,7 +108,7 @@ internal class S3WorkspaceFactoryTest {
`when`(bucket.objects).thenReturn(objects)
`when`(objects.contains("12345678901234561234567890123456/.workspace")).thenReturn(true)

assertNotNull(S3WorkspaceFactory(client, name.name)[hash])
assertNotNull(runBlocking { S3WorkspaceFactory(client, name.name).get(hash) })
}
}
}
Expand Down Expand Up @@ -138,7 +139,7 @@ internal class S3WorkspaceFactoryTest {
`when`(objects.contains("12345678901234561234567890123456/.workspace")).thenReturn(true)

assertThrows<WorkspaceAlreadyExistsError> {
S3WorkspaceFactory(client, name.name).create(hash)
runBlocking { S3WorkspaceFactory(client, name.name).create(hash) }
}
}
}
Expand All @@ -165,7 +166,7 @@ internal class S3WorkspaceFactoryTest {
`when`(objects.contains("12345678901234561234567890123456/.workspace")).thenReturn(false)
`when`(objects.touch("12345678901234561234567890123456/.workspace")).thenReturn(derps)

assertNotNull(S3WorkspaceFactory(client, name.name).create(hash))
assertNotNull(runBlocking { S3WorkspaceFactory(client, name.name).create(hash) })
}
}
}
Expand Down
Loading

0 comments on commit dc3f0e5

Please sign in to comment.