Skip to content

Commit

Permalink
Migrating existing rest fe test to real cases
Browse files Browse the repository at this point in the history
  • Loading branch information
yaooqinn committed Dec 28, 2021
1 parent fbd9769 commit 0c1feb4
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,14 @@ class KyuubiRestFrontendServiceSuite extends RestFrontendTestHelper {
}

test("error and exception response") {
// send a not exists request
var response = webTarget.path("api/v1/pong").request().get()
assert(404 == response.getStatus)
assert(response.getStatusInfo.getReasonPhrase.equalsIgnoreCase("not found"))

// send a exists request but wrong http method
response = webTarget.path("api/v1/ping").request().post(null)
assert(405 == response.getStatus)
assert(response.getStatusInfo.getReasonPhrase.equalsIgnoreCase("method not allowed"))

// send a request but throws a exception on the server side
response = webTarget.path("api/v1/exception").request().get()
assert(500 == response.getStatus)
assert(response.getStatusInfo.getReasonPhrase.equalsIgnoreCase("server error"))
Expand Down

0 comments on commit 0c1feb4

Please sign in to comment.