Skip to content

Commit

Permalink
test(backend): use go test in backend presubmit test (#4417)
Browse files Browse the repository at this point in the history
* enable pagination when expanding experiment in both the home page and the archive page

* Revert "enable pagination when expanding experiment in both the home page and the archive page"

This reverts commit 5b67273.

* checkpoint

* go test to replace bazel test

* go command

* test current directory when go test is run

* remove accidentally committed file

* adjust relative path according to pwd

* go test seems missing dependency pkgs

* need go version that supports mod

* try download .tar.gz to install go version 1.13.*

* adjust the path according to the extracted package

* put go src and kubeflow/pipelines under the same go/src seems to give me a vendor inconsisten error. so separate them.

* use non-relative path; non-verbose for wget and tar
  • Loading branch information
jingzhang36 committed Sep 2, 2020
1 parent 6b54eec commit 0856a4d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ require (
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/peterhellberg/duration v0.0.0-20191119133758-ec6baeebcd10
github.com/pkg/errors v0.8.0
github.com/prometheus/client_golang v0.9.2 // indirect
github.com/prometheus/client_golang v0.9.2
github.com/robfig/cron v0.0.0-20180505203441-b41be1df6967
github.com/sirupsen/logrus v1.0.6
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
Expand Down
22 changes: 11 additions & 11 deletions test/presubmit-backend-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# usage: `./hack/run_unit_tests_backend.sh` to run backend unit tests once
# `WATCH=true ./hack/run_unit_tests_backend.sh` to watch code changes and auto rerun tests
# Note: ibazel can be downloaded from https://github.com/bazelbuild/bazel-watcher

COMMAND="bazel"
if [ -n "$WATCH" ]; then
COMMAND="ibazel"
fi
$COMMAND --host_jvm_args=-Xmx500m --host_jvm_args=-Xms500m test \
--noshow_progress --noshow_loading_progress --define=grpc_no_ares=true \
--test_output=all //backend/...
# The current directory is /home/prow/go/src/github.com/kubeflow/pipelines
# 1. install go in /home/prow/go1.13.3
cd /home/prow
mkdir go1.13.3
cd go1.13.3
wget --quiet https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz
tar -xf go1.13.3.linux-amd64.tar.gz
# 2. run test in project directory
cd /home/prow/go/src/github.com/kubeflow/pipelines
/home/prow/go1.13.3/go/bin/go mod vendor
/home/prow/go1.13.3/go/bin/go test -v -cover ./backend/...

0 comments on commit 0856a4d

Please sign in to comment.