pritidesai commented on a change in pull request #801: Adding Docker and Native
support
URL:
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/801#discussion_r174633760
##########
File path: parsers/manifest_parser_test.go
##########
@@ -893,6 +896,42 @@ func TestComposeActionsForFunctionWithRemoteDir(t
*testing.T) {
assert.NotNil(t, err, "Compose actions should have exited with error
when code is specified but runtime is missing.")
}
+// validate manifest_parser.ComposeActions() method
+func TestComposeActionsForDocker(t *testing.T) {
+
+ file := "../tests/dat/manifest_data_compose_actions_for_docker.yaml"
+ p, m, _ := testLoadParseManifest(t, file)
+
+ actions, err := p.ComposeActionsFromAllPackages(m, m.Filepath,
whisk.KeyValue{})
+ assert.Nil(t, err, fmt.Sprintf(TEST_ERROR_COMPOSE_ACTION_FAILURE, file))
+
+ var expectedResult, actualResult string
+ for _, action := range actions {
+ switch action.Action.Name {
+ case "OpenWhiskSkeleton":
+ case "OpenWhiskSkeletonWithNative":
+ assert.Equal(t, utils.BLACKBOX,
action.Action.Exec.Kind, fmt.Sprintf(TEST_MSG_ACTION_DOCKER_KIND_MISMATCH,
action.Action.Exec.Kind))
+ assert.Equal(t, NATIVE_DOCKER_IMAGE,
action.Action.Exec.Image, TEST_MSG_ACTION_DOCKER_IMAGE_MISMATCH)
+ case "CustomDockerAction1":
+ case "CustomDockerAction2":
+ expectedResult, _ =
filepath.Abs("../tests/src/integration/docker/actions/exec.zip")
Review comment:
👍 done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services