This is an automated email from the ASF dual-hosted git repository.
pdesai pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/incubator-openwhisk-wskdeploy.git
The following commit(s) were added to refs/heads/master by this push:
new b3aa03b Resolves issue #899 (#906)
b3aa03b is described below
commit b3aa03b3312cad275e7b7dee68f38df25a07bff3
Author: Pavel Kravchenko <[email protected]>
AuthorDate: Tue May 15 22:54:05 2018 +0300
Resolves issue #899 (#906)
* resolves issue #899
* bug fix
---
parsers/yamlparser.go | 1 +
tests/src/integration/common/wskdeploy.go | 4 ++++
tests/src/integration/export/export_test.go | 29 +++++++++++++++++++++++++++--
3 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/parsers/yamlparser.go b/parsers/yamlparser.go
index 0b7c158..77f35da 100644
--- a/parsers/yamlparser.go
+++ b/parsers/yamlparser.go
@@ -403,6 +403,7 @@ func (yaml *YAML) ComposeParsersAction(wskact whisk.Action)
*Action {
action.Name = wskact.Name
action.Namespace = wskact.Namespace
action.Version = wskact.Version
+ action.Main = wskact.Exec.Main
action.Inputs = make(map[string]Parameter)
for _, keyval := range wskact.Parameters {
diff --git a/tests/src/integration/common/wskdeploy.go
b/tests/src/integration/common/wskdeploy.go
index abcbc3a..32938a2 100644
--- a/tests/src/integration/common/wskdeploy.go
+++ b/tests/src/integration/common/wskdeploy.go
@@ -171,6 +171,10 @@ func (Wskdeploy *Wskdeploy)
ManagedDeploymentOnlyManifest(manifestPath string) (
return Wskdeploy.RunCommand("sync", "-m", manifestPath)
}
+func (Wskdeploy *Wskdeploy) ManagedDeploymentManifestAndProject(manifestPath
string, projectName string) (string, error) {
+ return Wskdeploy.RunCommand("sync", "-m", manifestPath,
"--projectname", projectName)
+}
+
func (Wskdeploy *Wskdeploy) ManagedDeployment(manifestPath string,
deploymentPath string) (string, error) {
return Wskdeploy.RunCommand("sync", "-m", manifestPath, "-d",
deploymentPath)
}
diff --git a/tests/src/integration/export/export_test.go
b/tests/src/integration/export/export_test.go
index 6cc0124..63f8fce 100644
--- a/tests/src/integration/export/export_test.go
+++ b/tests/src/integration/export/export_test.go
@@ -62,6 +62,29 @@ func TestExport(t *testing.T) {
assert.Equal(t, nil, err, "Failed to undeploy the lib2.")
}
+func TestExportHelloWorld(t *testing.T) {
+ projectName := "HELLO_WORLD"
+ wskdeploy := common.NewWskdeploy()
+
+ _, err :=
wskdeploy.ManagedDeploymentManifestAndProject(manifestHelloWorldPath,
projectName)
+ assert.Equal(t, nil, err, "Failed to deploy manifest file.")
+
+ _, err = wskdeploy.ExportProject(projectName,
targetManifestHelloWorldPath)
+ assert.Equal(t, nil, err, "Failed to export project.")
+
+ _, err = os.Stat(targetManifestHelloWorldPath)
+ assert.Equal(t, nil, err, "Missing exported manifest file")
+
+ _, err = wskdeploy.UndeployManifestPathOnly(manifestHelloWorldPath)
+ assert.Equal(t, nil, err, "Failed to undeploy")
+
+ _, err =
wskdeploy.ManagedDeploymentManifestAndProject(targetManifestHelloWorldPath,
projectName)
+ assert.Equal(t, nil, err, "Failed to redeploy exported project.")
+
+ _, err =
wskdeploy.UndeployManifestPathOnly(targetManifestHelloWorldPath)
+ assert.Equal(t, nil, err, "Failed to undeploy exported project")
+}
+
func TestExport2Pack(t *testing.T) {
projectName := "2pack"
wskdeploy := common.NewWskdeploy()
@@ -93,6 +116,8 @@ var (
targetManifestFolder = os.Getenv("GOPATH") +
"/src/github.com/apache/incubator-openwhisk-wskdeploy/tests/src/integration/export/tmp/"
targetManifestPath = targetManifestFolder + "manifest.yaml"
- manifest2PackPath = os.Getenv("GOPATH") +
"/src/github.com/apache/incubator-openwhisk-wskdeploy/tests/src/integration/export/manifest_2pack.yaml"
- target2PackManifestPath = targetManifestFolder +
"exported2packmanifest.yaml"
+ manifestHelloWorldPath = os.Getenv("GOPATH") +
"/src/github.com/apache/incubator-openwhisk-wskdeploy/tests/src/integration/helloworld/manifest.yaml"
+ targetManifestHelloWorldPath = targetManifestFolder + "manifest.yaml"
+ manifest2PackPath = os.Getenv("GOPATH") +
"/src/github.com/apache/incubator-openwhisk-wskdeploy/tests/src/integration/export/manifest_2pack.yaml"
+ target2PackManifestPath = targetManifestFolder +
"exported2packmanifest.yaml"
)
--
To stop receiving notification emails like this one, please contact
[email protected].