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/18 21:01:52 UTC
[incubator-openwhisk-cli] branch master updated: Revert "Sync tests
+ cli (#87)"
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
The following commit(s) were added to refs/heads/master by this push:
new 318e93e Revert "Sync tests + cli (#87)"
318e93e is described below
commit 318e93ecd0ceb99be018b9eae264f5f447213948
Author: Carlos Santana <cs...@gmail.com>
AuthorDate: Tue Jul 18 17:00:13 2017 -0400
Revert "Sync tests + cli (#87)"
This reverts commit 15e18d4a12eaed239f43440a33b33210fb6f0dcb.
---
commands/package.go | 10 +++++++-
commands/property.go | 4 +--
.../test/scala/system/basic/WskBasicTests.scala | 30 ++++++++++++----------
tools/travis/test_openwhisk.sh | 8 +++---
4 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/commands/package.go b/commands/package.go
index 89b882f..68e75c5 100644
--- a/commands/package.go
+++ b/commands/package.go
@@ -378,6 +378,7 @@ 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",
@@ -397,9 +398,16 @@ 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)
@@ -412,7 +420,6 @@ var packageListCmd = &cobra.Command{
}
printList(packages)
-
return nil
},
}
@@ -521,6 +528,7 @@ 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"))
diff --git a/commands/property.go b/commands/property.go
index 8e81390..a29ab14 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 {
diff --git a/tests/src/test/scala/system/basic/WskBasicTests.scala b/tests/src/test/scala/system/basic/WskBasicTests.scala
index ed926a2..ef86c1b 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")
- 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))
+ 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))
- 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,9 +884,13 @@ class WskBasicTests
(wp, assetHelper) =>
val auth: Seq[String] = Seq("--auth", wskprops.authKey)
- val lastId = "dummyActivationId"
+ assetHelper.withCleaner(wsk.action, "lastName") {
+ (action, _) => wsk.action.create("lastName", defaultAction)
+ }
+ val lastId = wsk.activation.extractActivationId(wsk.action.invoke("lastName")).get
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 29ac6bc..5268500 100755
--- a/tools/travis/test_openwhisk.sh
+++ b/tools/travis/test_openwhisk.sh
@@ -38,13 +38,11 @@ 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=*ApiGwTests*
-sleep 30
+./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=*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>'].