You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ho...@apache.org on 2017/07/19 15:06:37 UTC

[incubator-openwhisk-cli] branch master updated (318e93e -> d492a17)

This is an automated email from the ASF dual-hosted git repository.

houshengbo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git.


    from 318e93e  Revert "Sync tests + cli (#87)"
     new 63743d5  Remove Unsupported Shared Flag from Package List (Review) (#2495)
     new c55484a  Externalize SetDefaultProperties (#2499)
     new d492a17  Harden system tests for --last flag. (#2497)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 commands/package.go                                | 10 +-------
 commands/property.go                               |  4 +--
 .../test/scala/system/basic/WskBasicTests.scala    | 30 ++++++++++------------
 tools/travis/test_openwhisk.sh                     |  8 +++---
 4 files changed, 21 insertions(+), 31 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].

[incubator-openwhisk-cli] 01/03: Remove Unsupported Shared Flag from Package List (Review) (#2495)

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houshengbo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git

commit 63743d5b5ec66020fad26c1c8749dd642c113124
Author: James Dubee <jw...@us.ibm.com>
AuthorDate: Tue Jul 18 13:01:36 2017 -0400

    Remove Unsupported Shared Flag from Package List (Review) (#2495)
---
 commands/package.go | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/commands/package.go b/commands/package.go
index 68e75c5..89b882f 100644
--- a/commands/package.go
+++ b/commands/package.go
@@ -378,7 +378,6 @@ var packageListCmd = &cobra.Command{
   PreRunE:       setupClientConfig,
   RunE: func(cmd *cobra.Command, args []string) error {
     var err error
-    var shared bool
     var qualifiedName QualifiedName
 
     if whiskErr := checkArgs(args, 0, 1, "Package list",
@@ -398,16 +397,9 @@ var packageListCmd = &cobra.Command{
       client.Namespace = qualifiedName.namespace
     }
 
-    if Flags.common.shared == "yes" {
-      shared = true
-    } else {
-      shared = false
-    }
-
     options := &whisk.PackageListOptions{
       Skip:   Flags.common.skip,
       Limit:  Flags.common.limit,
-      Public: shared,
     }
 
     packages, _, err := client.Packages.List(options)
@@ -420,6 +412,7 @@ var packageListCmd = &cobra.Command{
     }
 
     printList(packages)
+
     return nil
   },
 }
@@ -528,7 +521,6 @@ func init() {
   packageBindCmd.Flags().StringSliceVarP(&Flags.common.param, "param", "p", []string{}, wski18n.T("parameter values in `KEY VALUE` format"))
   packageBindCmd.Flags().StringVarP(&Flags.common.paramFile, "param-file", "P", "", wski18n.T("`FILE` containing parameter values in JSON format"))
 
-  packageListCmd.Flags().StringVar(&Flags.common.shared, "shared", "", wski18n.T("include publicly shared entities in the result"))
   packageListCmd.Flags().IntVarP(&Flags.common.skip, "skip", "s", 0, wski18n.T("exclude the first `SKIP` number of packages from the result"))
   packageListCmd.Flags().IntVarP(&Flags.common.limit, "limit", "l", 30, wski18n.T("only return `LIMIT` number of packages from the collection"))
 

-- 
To stop receiving notification emails like this one, please contact
"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>.

[incubator-openwhisk-cli] 03/03: Harden system tests for --last flag. (#2497)

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houshengbo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git

commit d492a179b50c19e0f294878f8be42d8fb423fef0
Author: Markus Thömmes <ma...@me.com>
AuthorDate: Sun Jul 16 14:36:26 2017 +0200

    Harden system tests for --last flag. (#2497)
    
    Using a hardcoded Thread.sleep timeout will inevitably fail in different test environments. Using the test helpers that retry under the hood will make those tests less intermittent failure prone.
    
    The rejection test doesn't actually need to invoke an action.
---
 .../test/scala/system/basic/WskBasicTests.scala    | 30 ++++++++++------------
 tools/travis/test_openwhisk.sh                     |  8 +++---
 2 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/tests/src/test/scala/system/basic/WskBasicTests.scala b/tests/src/test/scala/system/basic/WskBasicTests.scala
index ef86c1b..ed926a2 100644
--- a/tests/src/test/scala/system/basic/WskBasicTests.scala
+++ b/tests/src/test/scala/system/basic/WskBasicTests.scala
@@ -864,19 +864,19 @@ class WskBasicTests
                 (action, _) => wsk.action.create("lastName", defaultAction)
             }
             val lastInvoke = wsk.action.invoke("lastName")
-            val includeID = wsk.activation.extractActivationId(lastInvoke).get
-            Thread.sleep(1000)
-
-            val lastFlag = Seq(
-                (Seq("activation", "get", "publish", "--last"), includeID),
-                (Seq("activation", "get", "--last"), includeID),
-                (Seq("activation", "logs", "--last"), includeStr),
-                (Seq("activation", "result", "--last"), includeStr))
+            withActivation(wsk.activation, lastInvoke) {
+                activation =>
+                    val lastFlag = Seq(
+                        (Seq("activation", "get", "publish", "--last"), activation.activationId),
+                        (Seq("activation", "get", "--last"), activation.activationId),
+                        (Seq("activation", "logs", "--last"), includeStr),
+                        (Seq("activation", "result", "--last"), includeStr))
 
-            lastFlag foreach {
-                case (cmd, output) =>
-                    val stdout = wsk.cli(cmd ++ wskprops.overrides ++ auth, expectedExitCode = SUCCESS_EXIT).stdout
-                    stdout should include(output)
+                    lastFlag foreach {
+                        case (cmd, output) =>
+                            val stdout = wsk.cli(cmd ++ wskprops.overrides ++ auth, expectedExitCode = SUCCESS_EXIT).stdout
+                            stdout should include(output)
+                    }
             }
     }
 
@@ -884,13 +884,9 @@ class WskBasicTests
         (wp, assetHelper) =>
             val auth: Seq[String] = Seq("--auth", wskprops.authKey)
 
-            assetHelper.withCleaner(wsk.action, "lastName") {
-                (action, _) => wsk.action.create("lastName", defaultAction)
-            }
-            val lastId = wsk.activation.extractActivationId(wsk.action.invoke("lastName")).get
+            val lastId = "dummyActivationId"
             val tooManyArgsMsg = s"${lastId}. An activation ID is required."
             val invalidField = s"Invalid field filter '${lastId}'."
-            Thread.sleep(1000)
 
             val invalidCmd = Seq(
                 (Seq("activation", "get", s"$lastId", "publish", "--last"), tooManyArgsMsg),
diff --git a/tools/travis/test_openwhisk.sh b/tools/travis/test_openwhisk.sh
index 5268500..29ac6bc 100755
--- a/tools/travis/test_openwhisk.sh
+++ b/tools/travis/test_openwhisk.sh
@@ -38,11 +38,13 @@ cp $TRAVIS_BUILD_DIR/wsk $WHISKDIR/bin
 
 # Run the test cases under openwhisk to ensure the quality of the binary.
 cd $TRAVIS_BUILD_DIR
-./gradlew :tests:test -Dtest.single=Wsk*Tests*
-./gradlew :tests:test -Dtest.single=*ApiGwRoutemgmtActionTests*
-sleep 30
+
 ./gradlew :tests:test -Dtest.single=*ApiGwTests*
 sleep 30
+./gradlew :tests:test -Dtest.single=*ApiGwRoutemgmtActionTests*
+sleep 30
 ./gradlew :tests:test -Dtest.single=*ApiGwEndToEndTests*
 sleep 30
+./gradlew :tests:test -Dtest.single=Wsk*Tests*
+
 make integration_test

-- 
To stop receiving notification emails like this one, please contact
"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>.

[incubator-openwhisk-cli] 02/03: Externalize SetDefaultProperties (#2499)

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houshengbo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git

commit c55484aa8e01f62686d34c3c076ff57dc55e5882
Author: Mark Deuser <md...@us.ibm.com>
AuthorDate: Tue Jul 18 13:50:19 2017 -0400

    Externalize SetDefaultProperties (#2499)
---
 commands/property.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/commands/property.go b/commands/property.go
index a29ab14..8e81390 100644
--- a/commands/property.go
+++ b/commands/property.go
@@ -338,7 +338,7 @@ func init() {
 
 }
 
-func setDefaultProperties() {
+func SetDefaultProperties() {
     Properties.Auth = DefaultAuth
     Properties.Namespace = DefaultNamespace
     Properties.APIHost = DefaultAPIHost
@@ -379,7 +379,7 @@ func GetPropertiesFilePath() (propsFilePath string, werr error) {
 func loadProperties() error {
     var err error
 
-    setDefaultProperties()
+    SetDefaultProperties()
 
     Properties.PropsFile, err = GetPropertiesFilePath()
     if err != nil {

-- 
To stop receiving notification emails like this one, please contact
"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>.