Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Commit

Permalink
fix issue that CHANGED_FILES is empty (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ying Chun Guo authored Apr 16, 2020
1 parent 7569e87 commit c72397b
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
17 changes: 16 additions & 1 deletion plugins/hello/test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,20 @@
# ===============================================
# Add you integration tests here

source "$(dirname $0)"/../../../test-infra/scripts/e2e-tests.sh

echo "TEST_INFRA_SCRIPTS: $TEST_INFRA_SCRIPTS"
echo "Testing kn-myplugin"
echo "Testing hello"

run() {

header "Running plugin hello e2e tests for Knative Serving $KNATIVE_SERVING_VERSION and Eventing $KNATIVE_EVENTING_VERSION"

go_test_e2e -timeout=45m ./test/e2e || fail_test

success
}

# Fire up
cd ${REPO_ROOT_DIR}
run $@
22 changes: 22 additions & 0 deletions plugins/hello/test/e2e/basic_flow_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright © 2020 The Knative Authors
//
// Licensed 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.
package e2e

import (
"testing"
)

func TestBasicWorkflow(t *testing.T) {
t.Log("Running TestBasicWorkflow")
}
3 changes: 2 additions & 1 deletion test/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ function loop_over_plugins() {
}

function list_plugins_changed_in_pr() {
echo "$CHANGED_FILES" | grep "^plugins/" | sed -e 's|plugins/\([^/]*\).*|\1|' | uniq | sort
CHANGED_FILES="$(list_changed_files)"
echo "$CHANGED_FILES" | grep "^plugins/" | sed -e 's|plugins/\([^/]*\).*|\1|' | uniq | sort
}

function fail_sub_test() {
Expand Down
1 change: 1 addition & 0 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

source "$(dirname $0)"/common.sh
source "$(dirname $0)"/../test-infra/scripts/e2e-tests.sh
source "$(dirname $0)"/../test-infra/scripts/presubmit-tests.sh

run() {
local basedir=$(basedir)
Expand Down

0 comments on commit c72397b

Please sign in to comment.