Skip to content

Commit

Permalink
Revert back to Jupiter for E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lauzadis committed Oct 2, 2023
1 parent 3581848 commit cd64b82
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
12 changes: 7 additions & 5 deletions services/s3/e2eTest/src/PaginatorTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,27 @@ import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.flow.transform
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withTimeout
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Test
import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import kotlin.test.assertContentEquals
import kotlin.time.Duration.Companion.seconds

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class PaginatorTest {
private val client = S3Client {
region = S3TestUtils.DEFAULT_REGION
}

private lateinit var testBucket: String

@BeforeTest
@BeforeAll
fun createResources(): Unit = runBlocking {
testBucket = S3TestUtils.getTestBucket(client)
}

@AfterTest
@AfterAll
fun cleanup() = runBlocking {
S3TestUtils.deleteBucketAndAllContents(client, testBucket)
}
Expand Down
29 changes: 14 additions & 15 deletions services/s3/e2eTest/src/S3IntegrationTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ import aws.smithy.kotlin.runtime.testing.RandomTempFile
import aws.smithy.kotlin.runtime.util.encodeToHex
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.toList
import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.TestInstance
import java.io.File
import java.util.UUID
import kotlin.test.AfterClass
import kotlin.test.BeforeClass
import kotlin.test.Test
import kotlin.test.assertContains
import kotlin.test.assertEquals
Expand All @@ -37,24 +38,22 @@ import kotlin.time.Duration.Companion.seconds
/**
* Tests for bucket operations and presigner
*/
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class S3BucketOpsIntegrationTest {
companion object {
lateinit var testBucket: String
private val client = S3Client {
region = S3TestUtils.DEFAULT_REGION
}

@BeforeClass
@JvmStatic
fun createResources(): Unit = runBlocking {
testBucket = S3TestUtils.getTestBucket(client)
}
private lateinit var testBucket: String

@AfterClass
fun cleanup() = runBlocking {
S3TestUtils.deleteBucketAndAllContents(client, testBucket)
}
@BeforeAll
fun createResources(): Unit = runBlocking {
testBucket = S3TestUtils.getTestBucket(client)
}

private val client = S3Client {
region = S3TestUtils.DEFAULT_REGION
@AfterAll
fun cleanup() = runBlocking {
S3TestUtils.deleteBucketAndAllContents(client, testBucket)
}

@Test
Expand Down
27 changes: 13 additions & 14 deletions services/s3/e2eTest/src/S3PresignerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,30 @@ import aws.smithy.kotlin.runtime.http.SdkHttpClient
import aws.smithy.kotlin.runtime.http.complete
import aws.smithy.kotlin.runtime.http.toByteStream
import kotlinx.coroutines.*
import kotlin.test.AfterClass
import kotlin.test.BeforeClass
import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.TestInstance
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.time.Duration.Companion.seconds

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class S3PresignerTest {
private val client = S3Client {
region = S3TestUtils.DEFAULT_REGION
}

companion object {
lateinit var testBucket: String
private lateinit var testBucket: String

@BeforeClass
@JvmStatic
fun createResources(): Unit = runBlocking {
testBucket = S3TestUtils.getTestBucket(client)
}
@BeforeAll
fun createResources(): Unit = runBlocking {
testBucket = S3TestUtils.getTestBucket(client)
}

@AfterClass
fun cleanup() = runBlocking {
S3TestUtils.deleteBucketAndAllContents(client, testBucket)
client.close()
}
@AfterAll
fun cleanup(): Unit = runBlocking {
S3TestUtils.deleteBucketAndAllContents(client, testBucket)
client.close()
}

@Test
Expand Down

0 comments on commit cd64b82

Please sign in to comment.