testing: replace legacy gopkg.in/check.v1
This commit replaces the legacy `gopkg.in/check.v1` testing dependency with `github.com/stretchr/testify`. Closes https://github.com/distribution/distribution/issues/3884. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
parent
bdf70a1e46
commit
bcbf0431d1
92 changed files with 24688 additions and 4322 deletions
|
@ -4,20 +4,14 @@ import (
|
|||
"context"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"gopkg.in/check.v1"
|
||||
)
|
||||
|
||||
func Test(t *testing.T) { check.TestingT(t) }
|
||||
|
||||
type MiddlewareSuite struct{}
|
||||
|
||||
var _ = check.Suite(&MiddlewareSuite{})
|
||||
|
||||
func (s *MiddlewareSuite) TestNoConfig(c *check.C) {
|
||||
func TestNoConfig(t *testing.T) {
|
||||
options := make(map[string]interface{})
|
||||
_, err := newCloudFrontStorageMiddleware(context.Background(), nil, options)
|
||||
c.Assert(err, check.ErrorMatches, "no baseurl provided")
|
||||
if err == nil || err.Error() != "no baseurl provided" {
|
||||
t.Fatalf(`expected error "no baseurl provided", got: %v`, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCloudFrontStorageMiddlewareGenerateKey(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue