Skip to content

Commit

Permalink
update a couple tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidangb committed May 23, 2024
1 parent 315af4f commit 91fae09
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ class EntityServiceSpec extends BaseServiceSpec with BeforeAndAfterEach {
val getJobFuture = entityService.getJob("workspaceNamespace", "workspaceName", jobId, dummyUserInfo("mytoken"))

ScalaFutures.whenReady(getJobFuture.failed) { actual =>
actual shouldBe a [ApiException]
val apiEx = actual.asInstanceOf[ApiException]
apiEx.getCode shouldEqual StatusCodes.NotFound.intValue
actual shouldBe a [FireCloudExceptionWithErrorReport]
val apiEx = actual.asInstanceOf[FireCloudExceptionWithErrorReport]
apiEx.errorReport.statusCode should contain(StatusCodes.NotFound)
}
}
"should escalate cWDS's error" in {
Expand All @@ -339,9 +339,9 @@ class EntityServiceSpec extends BaseServiceSpec with BeforeAndAfterEach {
val getJobFuture = entityService.getJob("workspaceNamespace", "workspaceName", jobId, dummyUserInfo("mytoken"))

ScalaFutures.whenReady(getJobFuture.failed) { actual =>
actual shouldBe a [ApiException]
val apiEx = actual.asInstanceOf[ApiException]
apiEx.getCode shouldBe StatusCodes.ImATeapot.intValue
actual shouldBe a [FireCloudExceptionWithErrorReport]
val apiEx = actual.asInstanceOf[FireCloudExceptionWithErrorReport]
apiEx.errorReport.statusCode should contain (StatusCodes.ImATeapot)
apiEx.getMessage should(include("cWDS unit test intentional error"))
}
}
Expand Down

0 comments on commit 91fae09

Please sign in to comment.