Repository: kubernetes-sigs/krew
Pull request #285 (2019-07-21 23:11:37)

test: remove -v from tests
-v is only useful if you want to see all the test cases that are being run.
I don't think this is useful locally or in the build system. I've been having
trouble scrolling a lot and trying to find the FAIL: line.

Any failed test will still print its t.Log or stdout/stderr printing along with
the test method name, so this should be fine.

/assign @corneliusweig
/kind cleanup

k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/krew/pull/285#" title="Author self-approved">ahmetb</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fkrew).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubernetes-sigs/krew/blob/master/OWNERS)~~ [ahmetb]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
codecov-io: # [Codecov](https://codecov.io/gh/kubernetes-sigs/krew/pull/285?src=pr&el=h1) Report
> Merging [#285](https://codecov.io/gh/kubernetes-sigs/krew/pull/285?src=pr&el=desc) into [master](https://codecov.io/gh/kubernetes-sigs/krew/commit/2364ae4dc4c691f65b229000bafc1e4e5bedcbf9?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/kubernetes-sigs/krew/pull/285/graphs/tree.svg?width=650&token=J3nFtARI2m&height=150&src=pr)](https://codecov.io/gh/kubernetes-sigs/krew/pull/285?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #285   +/-   ##
=======================================
  Coverage   54.84%   54.84%           
=======================================
  Files          19       19           
  Lines         877      877           
=======================================
  Hits          481      481           
  Misses        342      342           
  Partials       54       54
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/kubernetes-sigs/krew/pull/285?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/kubernetes-sigs/krew/pull/285?src=pr&el=footer). Last update [2364ae4...22dbbe0](https://codecov.io/gh/kubernetes-sigs/krew/pull/285?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/.travis.yml b/.travis.yml
index 81ea973..1a6f583 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,7 +14,7 @@ script:
 - hack/verify-boilerplate.sh
 - hack/verify-gofmt.sh
 - hack/run-lint.sh
-- go test -v -short -coverprofile=coverage.txt -covermode=atomic ./...
+- go test -short -coverprofile=coverage.txt -covermode=atomic ./...
 - hack/make-all.sh
 - hack/verify-installation.sh
 - hack/ensure-kubectl-installed.sh
diff --git a/pkg/installation/install.go b/pkg/installation/install.go
index e00399c..426cba7 100644
--- a/pkg/installation/install.go
+++ b/pkg/installation/install.go
@@ -26,8 +26,8 @@ import (
 	"sigs.k8s.io/krew/pkg/download"
 	"sigs.k8s.io/krew/pkg/environment"
 	"sigs.k8s.io/krew/pkg/index"
+	"sigs.k8s.io/krew/pkg/installation/receipt"
 	"sigs.k8s.io/krew/pkg/pathutil"
-	"sigs.k8s.io/krew/pkg/receipt"
 )
 
 // Plugin Lifecycle Errors
diff --git a/pkg/installation/upgrade.go b/pkg/installation/upgrade.go
index e0abb98..5a5b325 100644
--- a/pkg/installation/upgrade.go
+++ b/pkg/installation/upgrade.go
@@ -18,13 +18,13 @@ import (
 	"io/ioutil"
 	"os"
 
+	"github.com/golang/glog"
+	"github.com/pkg/errors"
+
 	"sigs.k8s.io/krew/pkg/environment"
 	"sigs.k8s.io/krew/pkg/index"
+	"sigs.k8s.io/krew/pkg/installation/receipt"
 	"sigs.k8s.io/krew/pkg/installation/semver"
-	"sigs.k8s.io/krew/pkg/receipt"
-
-	"github.com/golang/glog"
-	"github.com/pkg/errors"
 )
 
 // Upgrade will reinstall and delete the old plugin. The operation tries
diff --git a/pkg/installation/util.go b/pkg/installation/util.go
index d8a2902..690ff30 100644
--- a/pkg/installation/util.go
+++ b/pkg/installation/util.go
@@ -22,8 +22,8 @@ import (
 
 	"sigs.k8s.io/krew/pkg/constants"
 	"sigs.k8s.io/krew/pkg/index"
+	"sigs.k8s.io/krew/pkg/installation/receipt"
 	"sigs.k8s.io/krew/pkg/pathutil"
-	"sigs.k8s.io/krew/pkg/receipt"
 )
 
 func pluginVersionFromPath(installPath, pluginPath string) (string, error) {


Test patch:
diff --git a/hack/run-integration-tests.sh b/hack/run-integration-tests.sh
index 02f0d6f..6c1625c 100755
--- a/hack/run-integration-tests.sh
+++ b/hack/run-integration-tests.sh
@@ -47,4 +47,4 @@ fi
 KREW_BINARY="${krew_binary_realpath}"
 export KREW_BINARY
 
-GO111MODULE=on go test -test.v sigs.k8s.io/krew/integration_test
+GO111MODULE=on go test sigs.k8s.io/krew/integration_test
diff --git a/hack/run-tests.sh b/hack/run-tests.sh
index 5177602..9563bfe 100755
--- a/hack/run-tests.sh
+++ b/hack/run-tests.sh
@@ -44,7 +44,7 @@ print_with_color "$color_blue" 'Running gofmt'
 "$SCRIPTDIR"/verify-gofmt.sh
 
 print_with_color "$color_blue" 'Running tests'
-GO111MODULE=on go test -v -short -race sigs.k8s.io/krew/...
+GO111MODULE=on go test -short -race sigs.k8s.io/krew/...
 
 print_with_color "$color_blue" 'Running linter'
 "$SCRIPTDIR"/run-lint.sh
diff --git a/pkg/receipt/receipt.go b/pkg/installation/receipt/receipt.go
similarity index 100%
rename from pkg/receipt/receipt.go
rename to pkg/installation/receipt/receipt.go
diff --git a/pkg/receipt/receipt_test.go b/pkg/installation/receipt/receipt_test.go
similarity index 96%
rename from pkg/receipt/receipt_test.go
rename to pkg/installation/receipt/receipt_test.go
index 3389f83..6e380c6 100644
--- a/pkg/receipt/receipt_test.go
+++ b/pkg/installation/receipt/receipt_test.go
@@ -16,7 +16,6 @@ package receipt
 
 import (
 	"os"
-	"path/filepath"
 	"testing"
 
 	"github.com/google/go-cmp/cmp"
@@ -65,7 +64,7 @@ func TestLoad(t *testing.T) {
 }
 
 func TestLoad_preservesNonExistsError(t *testing.T) {
-	_, err := Load(filepath.Join("foo", "non-existing.yaml"))
+	_, err := Load("non-existing.yaml")
 	if !os.IsNotExist(err) {
 		t.Fatalf("returned error is not ENOENT: %+v", err)
 	}