Skip to content

Commit 96d9e49

Browse files
committed
Migrate HealthCheckTests to new test structure and integrate into AmazonJavaSdkNewTestSuite
1 parent b4635b2 commit 96d9e49

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/aws/AmazonJavaSdkNewTestSuite.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ abstract class AmazonJavaSdkNewTestSuite
1414
with FifoDeduplicationTests
1515
with MessageAttributesTests
1616
with TracingTests
17+
with HealthCheckTests
1718

1819
class AmazonJavaSdkV1TestSuite extends AmazonJavaSdkNewTestSuite with SqsClientServerCommunication
1920
class AmazonJavaSdkV2TestSuite extends AmazonJavaSdkNewTestSuite with SqsClientServerWithSdkV2Communication

rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/HealthCheckTest.scala renamed to rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/aws/HealthCheckTests.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
package org.elasticmq.rest.sqs
1+
package org.elasticmq.rest.sqs.aws
2+
23
import org.apache.pekko.http.scaladsl.Http
3-
import org.apache.pekko.http.scaladsl.model.{HttpRequest, HttpResponse, StatusCodes}
4+
import org.apache.pekko.http.scaladsl.model.{HttpRequest, StatusCodes}
45
import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
5-
import org.scalatest.matchers.should.Matchers
66

7+
import scala.concurrent.Await
78
import scala.concurrent.duration.DurationInt
8-
import scala.concurrent.{Await, Future}
99

10-
class HealthCheckTest extends SqsClientServerCommunication with ScalatestRouteTest with Matchers {
10+
trait HealthCheckTests extends AmazonJavaSdkNewTestBase with ScalatestRouteTest {
1111

1212
test("health check") {
13-
val responseFuture: Future[HttpResponse] = Http().singleRequest(HttpRequest(uri = s"$ServiceEndpoint/health"))
13+
val responseFuture = Http().singleRequest(HttpRequest(uri = s"http://localhost:9321/health"))
1414
val response = Await.result(responseFuture, 10.seconds)
1515

1616
response.status shouldBe StatusCodes.OK

0 commit comments

Comments
 (0)