lzbj commented on a change in pull request #310: Support both manifest.yaml and 
manifest.yml
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/310#discussion_r133870776
 
 

 ##########
 File path: tests/src/integration/common/wskdeploy.go
 ##########
 @@ -18,38 +18,46 @@
 package common
 
 import (
-    "os"
-    "os/exec"
+       "os"
+       "os/exec"
 )
 
 const cmd = "wskdeploy"
 
 type Wskdeploy struct {
-    Path string
-    Dir  string
+       Path string
+       Dir  string
 }
 
 func NewWskdeploy() *Wskdeploy {
-    return NewWskWithPath(os.Getenv("GOPATH") + 
"/src/github.com/apache/incubator-openwhisk-wskdeploy/")
+       return NewWskWithPath(os.Getenv("GOPATH") + 
"/src/github.com/apache/incubator-openwhisk-wskdeploy/")
 }
 
 func NewWskWithPath(path string) *Wskdeploy {
-    var dep Wskdeploy
-    dep.Path = cmd
-    dep.Dir = path
-    return &dep
+       var dep Wskdeploy
+       dep.Path = cmd
+       dep.Dir = path
+       return &dep
 }
 
 func (wskdeploy *Wskdeploy) RunCommand(s ...string) ([]byte, error) {
-    command := exec.Command(wskdeploy.Path, s...)
-    command.Dir = wskdeploy.Dir
-    return command.CombinedOutput()
+       command := exec.Command(wskdeploy.Path, s...)
+       command.Dir = wskdeploy.Dir
+       return command.CombinedOutput()
 }
 
 func (wskdeploy *Wskdeploy) Deploy(manifestPath string, deploymentPath string) 
([]byte, error) {
-    return wskdeploy.RunCommand("-m", manifestPath, "-d", deploymentPath)
+       return wskdeploy.RunCommand("-m", manifestPath, "-d", deploymentPath)
 }
 
 func (wskdeploy *Wskdeploy) Undeploy(manifestPath string, deploymentPath 
string) ([]byte, error) {
-    return wskdeploy.RunCommand("undeploy", "-m", manifestPath, "-d", 
deploymentPath)
+       return wskdeploy.RunCommand("undeploy", "-m", manifestPath, "-d", 
deploymentPath)
+}
+
+func (wskdeploy *Wskdeploy) DeployProjectPathOnly(projectPath string) ([]byte, 
error) {
+        return wskdeploy.RunCommand("-p", projectPath)
+}
+
+func (wskdeploy *Wskdeploy) DeployManifestPathOnly(manifestpath string) 
([]byte, error) {
+       return wskdeploy.RunCommand("-p", manifestpath)
 
 Review comment:
   @pritidesai , thanks for your review, I'll change the test code accordingly. 
   @mrutkows , we could set the interactive mute, so the deploy will go by 
default. I'll change the test code.
 
----------------------------------------------------------------
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

Reply via email to