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

Fix issue that CHANGED_FILES is empty #17

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion plugins/hello/test/e2e-tests.sh
Original file line number Diff line number Diff line change
@@ -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")
daisy-ycguo marked this conversation as resolved.
Show resolved Hide resolved
}
3 changes: 2 additions & 1 deletion test/common.sh
Original file line number Diff line number Diff line change
@@ -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() {
1 change: 1 addition & 0 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
@@ -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)