Skip to content

Bumping to gradle 6 #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
#
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
4 changes: 2 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand Down Expand Up @@ -44,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8'
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
4 changes: 2 additions & 2 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -30,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
10 changes: 7 additions & 3 deletions tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ tasks.withType(Test) {
}

dependencies {
compile "org.scala-lang:scala-library:${gradle.scala.version}"
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests"
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources"
implementation "junit:junit:4.11"
implementation "org.scala-lang:scala-library:${gradle.scala.version}"
implementation "org.scalatest:scalatest_${gradle.scala.depVersion}:3.0.8"
implementation "io.spray:spray-json_${gradle.scala.depVersion}:1.3.5"
implementation "org.apache.openwhisk:openwhisk-common:${gradle.openwhisk.version}"
implementation "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests"
implementation "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources"
implementation group: 'com.typesafe.akka', name: "akka-http2-support_${gradle.scala.depVersion}", version: "${gradle.akka_http.version}"
implementation group: 'com.typesafe.akka', name: "akka-http-xml_${gradle.scala.depVersion}", version: "${gradle.akka_http.version}"
implementation group: 'com.typesafe.akka', name: "akka-discovery_${gradle.scala.depVersion}", version: "${gradle.akka.version}"
Expand Down
23 changes: 15 additions & 8 deletions tests/src/test/scala/runtime/sdk/SwiftSDKTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ abstract class SwiftSDKTests extends TestHelpers with WskTestHelpers with WskAct
activation.response.success shouldBe true

// should have a field named "activationId" which is the date action's activationId
activation.response.result.get.fields("activationId").toString.length should be >= 32
activation.response.result.get.asJsObject.fields("activationId").toString.length should be >= 32

// check for "date" field that comes from invoking the date action
org.apache.openwhisk.utils.JsHelpers
.fieldPathExists(activation.response.result.get, "response", "result", "date") should be(true)
.fieldPathExists(activation.response.result.get.asJsObject, "response", "result", "date") should be(true)
}
}

Expand All @@ -98,10 +98,11 @@ abstract class SwiftSDKTests extends TestHelpers with WskTestHelpers with WskAct
val run = wsk.action.invoke(actionName, params)
withActivation(wsk.activation, run, initialWait = 5 seconds, totalWait = activationPollDuration) { activation =>
// should not have a "response"
org.apache.openwhisk.utils.JsHelpers.fieldPathExists(activation.response.result.get, "response") shouldBe false
org.apache.openwhisk.utils.JsHelpers
.fieldPathExists(activation.response.result.get.asJsObject, "response") shouldBe false

// should have a field named "activationId" which is the date action's activationId
activation.response.result.get.fields("activationId").toString.length should be >= 32
activation.response.result.get.asJsObject.fields("activationId").toString.length should be >= 32
}
}

Expand Down Expand Up @@ -146,7 +147,7 @@ abstract class SwiftSDKTests extends TestHelpers with WskTestHelpers with WskAct
activation.response.success shouldBe true

// should have a field named "activationId" which is the date action's activationId
activation.response.result.get.fields("activationId").toString.length should be >= 32
activation.response.result.get.asJsObject.fields("activationId").toString.length should be >= 32

// should result in an activation for triggerName
val triggerActivations = wsk.activation.pollFor(1, Some(triggerName), retries = 20)
Expand Down Expand Up @@ -186,7 +187,7 @@ abstract class SwiftSDKTests extends TestHelpers with WskTestHelpers with WskAct
activation.response.success shouldBe true

// should have a field named "name" which is the name of the trigger created
activation.response.result.get.fields("name") shouldBe JsString(triggerName)
activation.response.result.get.asJsObject.fields("name") shouldBe JsString(triggerName)
}
}

Expand Down Expand Up @@ -237,10 +238,16 @@ abstract class SwiftSDKTests extends TestHelpers with WskTestHelpers with WskAct
activation.response.success shouldBe true

// should have a field named "trigger" which is the name of the trigger associated with the rule
activation.response.result.get.fields("trigger").asJsObject.fields("name") shouldBe ruleTriggerName.toJson
activation.response.result.get.asJsObject
.fields("trigger")
.asJsObject
.fields("name") shouldBe ruleTriggerName.toJson

// should have a field named "action" which is the name of the action associated with the rule
activation.response.result.get.fields("action").asJsObject.fields("name") shouldBe ruleActionName.toJson
activation.response.result.get.asJsObject
.fields("action")
.asJsObject
.fields("name") shouldBe ruleActionName.toJson
}
}

Expand Down