This is an automated email from the ASF dual-hosted git repository.
rabbah pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-swift.git
The following commit(s) were added to refs/heads/master by this push:
new 019024d Fix permissions and add API key annotations for upstream
changes. (#93)
019024d is described below
commit 019024df95434fb3a4390ee0d88dea78af3fa0c9
Author: rodric rabbah <[email protected]>
AuthorDate: Fri Mar 29 13:50:44 2019 -0400
Fix permissions and add API key annotations for upstream changes. (#93)
---
ansible/environments/local/group_vars/all | 0
core/swift3.1.1Action/Dockerfile | 0
core/swift3.1.1Action/build.gradle | 0
core/swift3.1.1Action/spm-build/Package.swift | 0
core/swift41Action/build.gradle | 0
core/swift41Action/spm-build/Package.swift | 0
core/swift42Action/build.gradle | 0
.../src/test/scala/runtime/sdk/SwiftSDKTests.scala | 33 ++++++++++++++++++----
8 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/ansible/environments/local/group_vars/all
b/ansible/environments/local/group_vars/all
old mode 100755
new mode 100644
diff --git a/core/swift3.1.1Action/Dockerfile b/core/swift3.1.1Action/Dockerfile
old mode 100755
new mode 100644
diff --git a/core/swift3.1.1Action/build.gradle
b/core/swift3.1.1Action/build.gradle
old mode 100755
new mode 100644
diff --git a/core/swift3.1.1Action/spm-build/Package.swift
b/core/swift3.1.1Action/spm-build/Package.swift
old mode 100755
new mode 100644
diff --git a/core/swift41Action/build.gradle b/core/swift41Action/build.gradle
old mode 100755
new mode 100644
diff --git a/core/swift41Action/spm-build/Package.swift
b/core/swift41Action/spm-build/Package.swift
old mode 100755
new mode 100644
diff --git a/core/swift42Action/build.gradle b/core/swift42Action/build.gradle
old mode 100755
new mode 100644
diff --git a/tests/src/test/scala/runtime/sdk/SwiftSDKTests.scala
b/tests/src/test/scala/runtime/sdk/SwiftSDKTests.scala
index 0dd1b2f..5ddd6c5 100644
--- a/tests/src/test/scala/runtime/sdk/SwiftSDKTests.scala
+++ b/tests/src/test/scala/runtime/sdk/SwiftSDKTests.scala
@@ -25,6 +25,7 @@ import common._
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import spray.json._
+import org.apache.openwhisk.core.entity.WhiskAction.provideApiKeyAnnotationName
import spray.json.DefaultJsonProtocol.StringJsonFormat
@RunWith(classOf[JUnitRunner])
@@ -51,7 +52,11 @@ abstract class SwiftSDKTests extends TestHelpers with
WskTestHelpers with WskAct
val actionName = "invokeAction"
assetHelper.withCleaner(wsk.action, actionName) { (action, _) =>
- action.create(name = actionName, artifact = file, kind =
Some(actionKind))
+ action.create(
+ name = actionName,
+ artifact = file,
+ kind = Some(actionKind),
+ annotations = Map(provideApiKeyAnnotationName -> JsTrue))
}
// invoke the action
var params = Map("dummy" -> JsString("dummy"))
@@ -78,7 +83,11 @@ abstract class SwiftSDKTests extends TestHelpers with
WskTestHelpers with WskAct
val file = Some(new File(actionTypeDir,
"invokeNonBlocking.swift").toString())
val actionName = "invokeNonBlockingAction"
assetHelper.withCleaner(wsk.action, actionName) { (action, _) =>
- action.create(name = actionName, file, kind = Some(actionKind))
+ action.create(
+ name = actionName,
+ file,
+ kind = Some(actionKind),
+ annotations = Map(provideApiKeyAnnotationName -> JsTrue))
}
// invoke the action
@@ -119,7 +128,11 @@ abstract class SwiftSDKTests extends TestHelpers with
WskTestHelpers with WskAct
val file = Some(new File(actionTypeDir, "trigger.swift").toString())
val actionName = "ActionThatTriggers"
assetHelper.withCleaner(wsk.action, actionName) { (action, _) =>
- action.create(name = actionName, file, kind = Some(actionKind))
+ action.create(
+ name = actionName,
+ file,
+ kind = Some(actionKind),
+ annotations = Map(provideApiKeyAnnotationName -> JsTrue))
}
// invoke the action
@@ -154,7 +167,11 @@ abstract class SwiftSDKTests extends TestHelpers with
WskTestHelpers with WskAct
assetHelper.withCleaner(wsk.action, actionName) { (action, _) =>
assetHelper.withCleaner(wsk.trigger, triggerName) { (_, _) =>
// using an asset cleaner on the created trigger name will clean it up
at the conclusion of the test
- action.create(name = actionName, file, kind = Some(actionKind))
+ action.create(
+ name = actionName,
+ file,
+ kind = Some(actionKind),
+ annotations = Map(provideApiKeyAnnotationName -> JsTrue))
}
}
@@ -181,7 +198,7 @@ abstract class SwiftSDKTests extends TestHelpers with
WskTestHelpers with WskAct
// create a dummy action and trigger for the rule
assetHelper.withCleaner(wsk.action, ruleActionName) { (action, name) =>
val dummyFile = Some(new File(actionTypeDir, "hello.swift").toString())
- action.create(name, dummyFile, kind = Some(actionKind))
+ action.create(name, dummyFile, kind = Some(actionKind), annotations =
Map(provideApiKeyAnnotationName -> JsTrue))
}
assetHelper.withCleaner(wsk.trigger, ruleTriggerName) { (trigger, name) =>
@@ -194,7 +211,11 @@ abstract class SwiftSDKTests extends TestHelpers with
WskTestHelpers with WskAct
// create an action that creates the rule
val createRuleFile = Some(new File(actionTypeDir,
"createRule.swift").toString())
assetHelper.withCleaner(wsk.action, "ActionThatCreatesRule") { (action,
name) =>
- action.create(name, createRuleFile, kind = Some(actionKind))
+ action.create(
+ name,
+ createRuleFile,
+ kind = Some(actionKind),
+ annotations = Map(provideApiKeyAnnotationName -> JsTrue))
}
// invoke the create rule action