Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openwhisk-runtime-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Groundhog
openwhisk-runtime-python
Commits
d6a89200
Commit
d6a89200
authored
6 years ago
by
Carlos Santana
Browse files
Options
Downloads
Patches
Plain Diff
enable actionllop tests
parent
8ee2d2da
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.travis.yml
+1
-1
1 addition, 1 deletion
.travis.yml
tests/src/test/scala/runtime/actionContainers/PythonActionContainerTests.scala
+36
-36
36 additions, 36 deletions
...runtime/actionContainers/PythonActionContainerTests.scala
tools/travis/publish.sh
+2
-0
2 additions, 0 deletions
tools/travis/publish.sh
with
39 additions
and
37 deletions
.travis.yml
+
1
−
1
View file @
d6a89200
...
...
@@ -26,7 +26,7 @@ deploy:
all_branches
:
true
repo
:
apache/incubator-openwhisk-runtime-python
-
provider
:
script
script
:
"
./tools/travis/publish.sh
openwhisk
2
latest
&&
./tools/travis/publish.sh
openwhisk
3
latest
&&
./tools/travis/publish.sh
openwhisk
3-ai
latest"
script
:
"
./tools/travis/publish.sh
openwhisk
2
latest
&&
./tools/travis/publish.sh
openwhisk
3
latest
&&
./tools/travis/publish.sh
openwhisk
3-ai
latest
&&
./tools/travis/publish.sh
openwhisk
3-loop
latest"
on
:
branch
:
master
repo
:
apache/incubator-openwhisk-runtime-python
...
...
This diff is collapsed.
Click to expand it.
tests/src/test/scala/runtime/actionContainers/PythonActionContainerTests.scala
+
36
−
36
View file @
d6a89200
...
...
@@ -206,27 +206,30 @@ class PythonActionContainerTests extends BasicActionRunnerTests with WskActorSys
e
should
include
(
"Zip file does not include"
)
})
}
/*
it should "run zipped Python action containing a virtual environment" in {
val zippedPythonAction = if (imageName == "python2action") "python2_virtualenv.zip" else "python3_virtualenv.zip"
val zippedPythonActionName = TestUtils.getTestActionFilename(zippedPythonAction)
val code = readAsBase64(Paths.get(zippedPythonActionName))
val (out, err) = withActionContainer() { c =>
val (initCode, initRes) = c.init(initPayload(code, main = "main"))
initCode should be(200)
val args = JsObject("msg" -> JsString("any"))
val (runCode, runRes) = c.run(runPayload(args))
runCode should be(200)
runRes.get.toString() should include("netmask")
}
checkStreams(out, err, {
case (o, e) =>
o should include("netmask")
e shouldBe empty
})
it
should
"run zipped Python action containing a virtual environment"
in
{
val
zippedPythonAction
=
if
(
imageName
==
"python2action"
)
"python2_virtualenv.zip"
else
if
(
imageName
==
"actionloop-python-v3.7"
)
"python37_virtualenv.zip"
else
"python3_virtualenv.zip"
val
zippedPythonActionName
=
TestUtils
.
getTestActionFilename
(
zippedPythonAction
)
val
code
=
readAsBase64
(
Paths
.
get
(
zippedPythonActionName
))
val
(
out
,
err
)
=
withActionContainer
()
{
c
=>
val
(
initCode
,
initRes
)
=
c
.
init
(
initPayload
(
code
,
main
=
"main"
))
initCode
should
be
(
200
)
val
args
=
JsObject
(
"msg"
->
JsString
(
"any"
))
val
(
runCode
,
runRes
)
=
c
.
run
(
runPayload
(
args
))
runCode
should
be
(
200
)
runRes
.
get
.
toString
()
should
include
(
"netmask"
)
}
*/
checkStreams
(
out
,
err
,
{
case
(
o
,
e
)
=>
o
should
include
(
"netmask"
)
e
shouldBe
empty
})
}
it
should
"run zipped Python action containing a virtual environment with non-standard entry point"
in
{
val
zippedPythonAction
=
...
...
@@ -235,24 +238,21 @@ class PythonActionContainerTests extends BasicActionRunnerTests with WskActorSys
else
"python3_virtualenv.zip"
val
zippedPythonActionName
=
TestUtils
.
getTestActionFilename
(
zippedPythonAction
)
// temporary guard to comment out this test
// until python37_virtualenv.zip is available in main repo
if
(
initErrorsAreLogged
)
{
val
code
=
readAsBase64
(
Paths
.
get
(
zippedPythonActionName
))
val
(
out
,
err
)
=
withActionContainer
()
{
c
=>
val
(
initCode
,
initRes
)
=
c
.
init
(
initPayload
(
code
,
main
=
"naim"
))
initCode
should
be
(
200
)
val
args
=
JsObject
(
"msg"
->
JsString
(
"any"
))
val
(
runCode
,
runRes
)
=
c
.
run
(
runPayload
(
args
))
runCode
should
be
(
200
)
runRes
.
get
.
toString
()
should
include
(
"netmask"
)
}
checkStreams
(
out
,
err
,
{
case
(
o
,
e
)
=>
o
should
include
(
"netmask"
)
e
shouldBe
empty
})
val
code
=
readAsBase64
(
Paths
.
get
(
zippedPythonActionName
))
val
(
out
,
err
)
=
withActionContainer
()
{
c
=>
val
(
initCode
,
initRes
)
=
c
.
init
(
initPayload
(
code
,
main
=
"naim"
))
initCode
should
be
(
200
)
val
args
=
JsObject
(
"msg"
->
JsString
(
"any"
))
val
(
runCode
,
runRes
)
=
c
.
run
(
runPayload
(
args
))
runCode
should
be
(
200
)
runRes
.
get
.
toString
()
should
include
(
"netmask"
)
}
checkStreams
(
out
,
err
,
{
case
(
o
,
e
)
=>
o
should
include
(
"netmask"
)
e
shouldBe
empty
})
}
it
should
"report error if zipped Python action containing a virtual environment for wrong python version"
in
{
...
...
This diff is collapsed.
Click to expand it.
tools/travis/publish.sh
+
2
−
0
View file @
d6a89200
...
...
@@ -36,6 +36,8 @@ elif [ ${RUNTIME_VERSION} == "3" ]; then
RUNTIME
=
"pythonAction"
elif
[
${
RUNTIME_VERSION
}
==
"3-ai"
]
;
then
RUNTIME
=
"python3AiAction"
elif
[
${
RUNTIME_VERSION
}
==
"3-loop"
]
;
then
RUNTIME
=
"pythonActionLoop"
fi
if
[[
!
-z
${
DOCKER_USER
}
]]
&&
[[
!
-z
${
DOCKER_PASSWORD
}
]]
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment