You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openserverless.apache.org by ms...@apache.org on 2024/07/27 15:45:50 UTC

(openserverless-cli) branch main updated (c45dfd2 -> 622c017)

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

msciabarra pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/openserverless-cli.git


 discard c45dfd2  fixed update test
     new 87a5b3f  fix tests update and plugin
     new 622c017  taskfile for tasktests

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (c45dfd2)
            \
             N -- N -- N   refs/heads/main (622c017)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 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:
 .gitmodules              |  3 +--
 Taskfile.yml             |  7 +------
 cli.code-workspace       | 10 +---------
 main.go                  | 16 +++++++++-------
 prepare.go               |  4 ++--
 tasktests/prereq.bats    | 31 -------------------------------
 tests/plugin.bats        |  2 +-
 tests/update.bats        |  4 ++--
 tests/update_branch.bats |  6 +++---
 version.txt              |  2 +-
 10 files changed, 21 insertions(+), 64 deletions(-)
 delete mode 100644 tasktests/prereq.bats


(openserverless-cli) 01/02: fix tests update and plugin

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

msciabarra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openserverless-cli.git

commit 87a5b3f5c104610bf63614b816c0381d675676fd
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Sat Jul 27 17:42:10 2024 +0200

    fix tests update and plugin
---
 .gitmodules              | 6 ++++++
 tasktests/olaris         | 1 +
 tests/plugin.bats        | 2 +-
 tests/update.bats        | 2 +-
 tests/update_branch.bats | 6 +++---
 version.txt              | 2 +-
 6 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/.gitmodules b/.gitmodules
index 68ca29d..80eeee5 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -21,9 +21,15 @@
 [submodule "tools/wsk"]
 	path = _patches/wsk
 	url = https://github.com/sciabarracom/openwhisk-cli
+	branch = openserverless
 [submodule "tools/wskdeploy"]
 	path = _patches/wskdeploy
 	url = https://github.com/sciabarracom/openwhisk-wskdeploy
+	branch = openserverless
 [submodule "_patches/sh"]
 	path = _patches/sh
 	url = https://github.com/sciabarracom/sh
+	branch = openserverless
+[submodule "tasktests/olaris"]
+	path = tasktests/olaris
+	url = https://github.com/apache/openserverless-task
diff --git a/tasktests/olaris b/tasktests/olaris
new file mode 160000
index 0000000..8821aa3
--- /dev/null
+++ b/tasktests/olaris
@@ -0,0 +1 @@
+Subproject commit 8821aa3833801ceffa6e240a2ddf8c4523300d0c
diff --git a/tests/plugin.bats b/tests/plugin.bats
index 4796a83..fe5c23d 100644
--- a/tests/plugin.bats
+++ b/tests/plugin.bats
@@ -19,7 +19,7 @@ setup() {
     load 'test_helper/bats-support/load'
     load 'test_helper/bats-assert/load'
     export NO_COLOR=1
-    export NUV_BRANCH="0.1.0"
+    export NUV_BRANCH="$(cat ../branch.txt)"
 }
 
 @test "nuv prints 'Plugins:'" {
diff --git a/tests/update.bats b/tests/update.bats
index 5301f9a..780dcaa 100644
--- a/tests/update.bats
+++ b/tests/update.bats
@@ -30,7 +30,7 @@ setup() {
 
 @test "nuv -update with old version warns" {
     NUV_VERSION=0.0.0 run nuv -update
-    assert_line --partial "Your nuv version (0.2.0) is older than the required version in nuvroot.json"
+    assert_line --partial "Your nuv version (0.0.0) is older than the required version in nuvroot.json"
     assert_line "Attempting to update nuv..."
     assert_success
 }
diff --git a/tests/update_branch.bats b/tests/update_branch.bats
index f05ad63..4cae448 100644
--- a/tests/update_branch.bats
+++ b/tests/update_branch.bats
@@ -19,16 +19,16 @@ setup() {
     load 'test_helper/bats-support/load'
     load 'test_helper/bats-assert/load'
     export NO_COLOR=1
-    export NUV_BRANCH=3.0.0-testing
+    export NUV_BRANCH=$(cat ../branch.txt)
     rm -rf ~/.nuv
     run nuv -update
-    cd ~/.nuv/3.0.0-testing/olaris
+    cd ~/.nuv/$NUV_BRANCH/olaris
 }
 
 @test "nuv -update on olaris with old commit updates correctly" {
     run git reset --hard HEAD~1
     run git status
-    assert_line --partial "Your branch is behind 'origin/3.0.0-testing'"
+    assert_line --partial "Your branch is behind"
 
     run nuv -update
     assert_line "Nuvfiles updated successfully"
diff --git a/version.txt b/version.txt
index 4611165..9bcce31 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-0.1.0-testing.2407261504
+0.1.0-testing.2407271736


(openserverless-cli) 02/02: taskfile for tasktests

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

msciabarra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openserverless-cli.git

commit 622c017d8f5a65d55c4ffcacc7b333118c67dd0e
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Sat Jul 27 17:45:35 2024 +0200

    taskfile for tasktests
---
 tasktests/Taskfile.yml | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/tasktests/Taskfile.yml b/tasktests/Taskfile.yml
new file mode 100644
index 0000000..f395392
--- /dev/null
+++ b/tasktests/Taskfile.yml
@@ -0,0 +1,51 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+version: "3"
+
+vars:
+  BRANCH: "0.1.0-testing"
+  BASEVER: "0.1.0-testing"
+  VERSION:
+    sh: git describe --tags --abbrev=0 2>/dev/null || git rev-parse --short HEAD
+  DEBUG: ""
+
+tasks:
+
+  default: task -l
+  setup: { silent:true }
+
+  bats:
+    dir: tests
+    cmds:
+    - git clone https://github.com/bats-core/bats-core bats
+    - git clone https://github.com/bats-core/bats-support test_helper/bats-support
+    - git clone https://github.com/bats-core/bats-assert test_helper/bats-assert
+    status:
+    - test -d bats
+
+  test:
+    desc: integration tests for nuv (T=<test-name> without .bats, empty all)
+    dir: tests
+    cmds:
+      - task: bats
+      - |
+        if test -z "{{.T}}"
+        then bats/bin/bats .
+        else bats/bin/bats {{.T}}.bats
+        fi
+