Skip to content

Commit

Permalink
Update rest-assured to v4.0.0 (#4500)
Browse files Browse the repository at this point in the history
* Update to restassured v4.0 which is compatible with jdk11

* Need to initialize both truststore and keystore for ssl cert to be validated
  • Loading branch information
chetanmeh authored and markusthoemmes committed May 31, 2019
1 parent 658516e commit aeabc35
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ dependencies {
compile 'org.apache.httpcomponents:httpclient:4.5.2:tests'
compile 'org.apache.httpcomponents:httpmime:4.3.6'
compile 'junit:junit:4.11'
compile 'com.jayway.restassured:rest-assured:2.6.0'
compile 'io.rest-assured:rest-assured:4.0.0'
compile 'org.scalatest:scalatest_2.12:3.0.5'
compile "com.typesafe.akka:akka-testkit_2.12:${gradle.akka.version}"
compile 'com.google.code.gson:gson:2.3.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import org.scalatest.FlatSpec
import org.scalatest.Matchers
import org.scalatest.junit.JUnitRunner

import com.jayway.restassured.RestAssured
import io.restassured.RestAssured

import common.TestHelpers
import common.TestUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import scala.util.Failure
import scala.util.Try
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import com.jayway.restassured.RestAssured
import com.jayway.restassured.response.Header
import io.restassured.RestAssured
import io.restassured.http.Header
import common._
import common.rest.WskRestOperations
import spray.json._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import org.junit.runner.RunWith
import org.scalatest.FlatSpec
import org.scalatest.Matchers
import org.scalatest.junit.JUnitRunner
import com.jayway.restassured.RestAssured
import io.restassured.RestAssured
import common.StreamLogging
import spray.json._
import spray.json.DefaultJsonProtocol._
Expand Down
2 changes: 1 addition & 1 deletion tests/src/test/scala/system/basic/WskSequenceTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package system.basic
import java.time.Instant
import java.util.Date

import com.jayway.restassured.RestAssured
import io.restassured.RestAssured

import scala.concurrent.duration.DurationInt
import scala.language.postfixOps
Expand Down
2 changes: 1 addition & 1 deletion tests/src/test/scala/system/basic/WskUnicodeTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package system.basic

import java.io.File
import com.jayway.restassured.RestAssured
import io.restassured.RestAssured
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner

Expand Down
2 changes: 1 addition & 1 deletion tests/src/test/scala/system/rest/ActionSchemaTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.junit.runner.RunWith
import org.scalatest.FlatSpec
import org.scalatest.Matchers
import org.scalatest.junit.JUnitRunner
import com.jayway.restassured.RestAssured
import io.restassured.RestAssured
import common._
import common.rest.WskRestOperations
import spray.json._
Expand Down
2 changes: 1 addition & 1 deletion tests/src/test/scala/system/rest/GoCLINginxTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.scalatest.FlatSpec
import org.scalatest.Matchers
import org.scalatest.junit.JUnitRunner

import com.jayway.restassured.RestAssured
import io.restassured.RestAssured

import spray.json._
import DefaultJsonProtocol._
Expand Down
9 changes: 5 additions & 4 deletions tests/src/test/scala/system/rest/RestUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ package system.rest
import akka.http.scaladsl.model.Uri

import scala.util.Try
import com.jayway.restassured.RestAssured
import com.jayway.restassured.config.RestAssuredConfig
import com.jayway.restassured.config.SSLConfig
import io.restassured.RestAssured
import io.restassured.config.RestAssuredConfig
import io.restassured.config.SSLConfig
import common.WhiskProperties
import spray.json._

Expand All @@ -38,7 +38,8 @@ trait RestUtil {
val sslconfig = {
val inner = new SSLConfig().allowAllHostnames()
val config = if (!skipKeyStore && trustStorePassword != null) {
inner.keystore("keystore", trustStorePassword)
inner.keyStore("keystore", trustStorePassword)
inner.trustStore("keystore", trustStorePassword)
} else {
inner.relaxedHTTPSValidation()
}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/test/scala/system/rest/SwaggerTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.scalatest.FlatSpec
import org.scalatest.Matchers
import org.scalatest.junit.JUnitRunner

import com.jayway.restassured.RestAssured
import io.restassured.RestAssured

import common.WhiskProperties

Expand Down

0 comments on commit aeabc35

Please sign in to comment.