Skip to content

Commit

Permalink
vendor: update gotest.tools v3.0.2
Browse files Browse the repository at this point in the history
full diff: gotestyourself/gotest.tools@v2.3.0...v3.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Feb 28, 2020
1 parent 4d24281 commit f2edc6f
Show file tree
Hide file tree
Showing 40 changed files with 154 additions and 106 deletions.
4 changes: 2 additions & 2 deletions cio/io_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (

"github.com/containerd/fifo"
"github.com/google/go-cmp/cmp/cmpopts"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)

func assertHasPrefix(t *testing.T, s, prefix string) {
Expand Down
2 changes: 1 addition & 1 deletion cio/io_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"path/filepath"
"testing"

"gotest.tools/assert"
"gotest.tools/v3/assert"
)

func TestOpenFifos(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cio/io_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package cio
import (
"testing"

"gotest.tools/assert"
"gotest.tools/v3/assert"
)

func TestNewFifoSetInDir_NoTerminal(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion client_ttrpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/containerd/containerd/pkg/ttrpcutil"
"github.com/containerd/ttrpc"
"github.com/gogo/protobuf/types"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

func TestClientTTRPC_New(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions content/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (

"github.com/containerd/containerd/errdefs"
"github.com/opencontainers/go-digest"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)

type copySource struct {
Expand Down
2 changes: 1 addition & 1 deletion content/local/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (

"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

type memoryLabelStore struct {
Expand Down
2 changes: 1 addition & 1 deletion content/testsuite/testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion gc/scheduler/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"time"

"github.com/containerd/containerd/gc"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

func TestPauseThreshold(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion log/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"testing"

"gotest.tools/assert"
"gotest.tools/v3/assert"
)

func TestLoggerContext(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion mount/lookup_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
// so we use continuity/testutil instead.
"github.com/containerd/continuity/testutil"
"github.com/containerd/continuity/testutil/loopback"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

func checkLookup(t *testing.T, fsType, mntPoint, dir string) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/testutil/helpers_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"testing"

"github.com/containerd/containerd/mount"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

// Unmount unmounts a given mountPoint and sets t.Error if it fails
Expand Down
2 changes: 1 addition & 1 deletion remotes/docker/fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"testing"

"github.com/pkg/errors"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

func TestFetcherOpen(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions remotes/docker/scope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"testing"

"github.com/containerd/containerd/reference"
"gotest.tools/assert"
"gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp"
)

func TestRepositoryScope(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion services/server/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"sort"
"testing"

"gotest.tools/assert"
"gotest.tools/v3/assert"

"github.com/containerd/containerd/plugin"
)
Expand Down
4 changes: 2 additions & 2 deletions services/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"testing"

srvconfig "github.com/containerd/containerd/services/server/config"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)

func TestCreateTopLevelDirectoriesErrorsWithSamePathForRootAndState(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion snapshots/benchsuite/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/containerd/continuity/fs/fstest"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"gotest.tools/assert"
"gotest.tools/v3/assert"

"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/snapshots"
Expand Down
4 changes: 2 additions & 2 deletions snapshots/devmapper/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (

"github.com/BurntSushi/toml"
"github.com/hashicorp/go-multierror"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)

func TestLoadConfig(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions snapshots/devmapper/dmsetup/dmsetup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (

"github.com/docker/go-units"
"golang.org/x/sys/unix"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"

"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/containerd/snapshots/devmapper/losetup"
Expand Down
4 changes: 2 additions & 2 deletions snapshots/devmapper/losetup/losetup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (

"github.com/docker/go-units"
"golang.org/x/sys/unix"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"

"github.com/containerd/containerd/pkg/testutil"
)
Expand Down
4 changes: 2 additions & 2 deletions snapshots/devmapper/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (

"github.com/pkg/errors"
"go.etcd.io/bbolt"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion snapshots/devmapper/pool_device_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"github.com/containerd/containerd/snapshots/devmapper/losetup"
"github.com/docker/go-units"
"github.com/sirupsen/logrus"
"gotest.tools/assert"
"gotest.tools/v3/assert"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion snapshots/devmapper/snapshotter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/containerd/continuity/fs/fstest"
"github.com/hashicorp/go-multierror"
"github.com/sirupsen/logrus"
"gotest.tools/assert"
"gotest.tools/v3/assert"

"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/namespaces"
Expand Down
4 changes: 2 additions & 2 deletions snapshots/storage/metastore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"github.com/containerd/containerd/snapshots"
"github.com/google/go-cmp/cmp"
"github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)

type testFunc func(context.Context, *testing.T, *MetaStore)
Expand Down
4 changes: 2 additions & 2 deletions snapshots/testsuite/testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import (
"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/continuity/fs/fstest"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)

// SnapshotterFunc is used in SnapshotterSuite
Expand Down
4 changes: 2 additions & 2 deletions sys/oom_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"testing"
"time"

"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)

func TestSetPositiveOomScoreAdjustment(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion vendor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ golang.org/x/sys c990c680b611ac1aeb7d8f2af94a
golang.org/x/text 19e51611da83d6be54ddafce4a4af510cb3e9ea4
google.golang.org/genproto e50cd9704f63023d62cd06a1994b98227fc4d21a
google.golang.org/grpc f495f5b15ae7ccda3b38c53a1bfcde4c1a58a2bc # v1.27.1
gotest.tools 1083505acf35a0bd8a696b26837e1fb3187a7a83 # v2.3.0
gotest.tools/v3 bb0d8a963040ea5048dcef1a14d8f8b58a33d4b3 # v3.0.2

# cri dependencies
github.com/containerd/cri c0294ebfe0b4342db85c0faf7727ceb8d8c3afce # master
Expand Down
8 changes: 0 additions & 8 deletions vendor/gotest.tools/go.mod

This file was deleted.

File renamed without changes.
31 changes: 23 additions & 8 deletions vendor/gotest.tools/README.md → vendor/gotest.tools/v3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,41 @@

A collection of packages to augment `testing` and support common patterns.

[![GoDoc](https://godoc.org/gotest.tools?status.svg)](https://godoc.org/gotest.tools)
[![GoDoc](https://godoc.org/gotest.tools?status.svg)](http://gotest.tools)
[![CircleCI](https://circleci.com/gh/gotestyourself/gotest.tools/tree/master.svg?style=shield)](https://circleci.com/gh/gotestyourself/gotest.tools/tree/master)
[![Go Reportcard](https://goreportcard.com/badge/gotest.tools)](https://goreportcard.com/report/gotest.tools)

## Usage

With Go modules enabled (go1.11+)

```
$ go get gotest.tools/v3
```

```
import "gotest.tools/v3/assert"
```

To use `gotest.tools` with an older version of Go that does not understand Go
module paths pin to version `v2.3.0`.


## Packages

* [assert](http://godoc.org/gotest.tools/assert) -
* [assert](http://gotest.tools/assert) -
compare values and fail the test when a comparison fails
* [env](http://godoc.org/gotest.tools/env) -
* [env](http://gotest.tools/env) -
test code which uses environment variables
* [fs](http://godoc.org/gotest.tools/fs) -
* [fs](http://gotest.tools/fs) -
create temporary files and compare a filesystem tree to an expected value
* [golden](http://godoc.org/gotest.tools/golden) -
* [golden](http://gotest.tools/golden) -
compare large multi-line strings against values frozen in golden files
* [icmd](http://godoc.org/gotest.tools/icmd) -
* [icmd](http://gotest.tools/icmd) -
execute binaries and test the output
* [poll](http://godoc.org/gotest.tools/poll) -
* [poll](http://gotest.tools/poll) -
test asynchronous code by polling until a desired state is reached
* [skip](http://godoc.org/gotest.tools/skip) -
* [skip](http://gotest.tools/skip) -
skip a test and print the source code of the condition used to skip the test

## Related
Expand Down
Loading

0 comments on commit f2edc6f

Please sign in to comment.