Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit e6e8bb8

Browse files
falkzolldubee
authored andcommitted
Make __OW_API_KEY available for action execution. (#86)
To have the environment variable __OW_API_KEY available inside an action now requires this to be enabled during action create step. This is now required due to a security fix inside Openwhisk core.
1 parent 06cf4df commit e6e8bb8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/src/test/scala/system/basic/WskBasicIBMPythonTests.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package system.basic
1818

1919
import common.{JsHelpers, TestHelpers, TestUtils, WhiskProperties, WskActorSystem, WskProps, WskTestHelpers}
2020
import common.rest.WskRestOperations
21+
import org.apache.openwhisk.core.entity.WhiskAction
2122
import org.junit.runner.RunWith
2223
import org.scalatest.junit.JUnitRunner
2324
import org.scalatest.Matchers
@@ -89,7 +90,11 @@ class WskBasicIBMPythonTests extends TestHelpers with WskTestHelpers with Matche
8990
(wp, assetHelper) =>
9091
val name = "stdenv"
9192
assetHelper.withCleaner(wsk.action, name) { (action, _) =>
92-
action.create(name, Some(TestUtils.getTestActionFilename("stdenv.py")), kind = Some(kind))
93+
action.create(
94+
name,
95+
Some(TestUtils.getTestActionFilename("stdenv.py")),
96+
kind = Some(kind),
97+
annotations = Map(WhiskAction.provideApiKeyAnnotationName -> JsBoolean(true)))
9398
}
9499

95100
withActivation(wsk.activation, wsk.action.invoke(name)) { activation =>

0 commit comments

Comments
 (0)