From f2d17b5b7d4d12bdc327ed3b0772c257807f30ef Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 28 Oct 2021 13:58:48 +0800 Subject: [PATCH] br: migrate test-infra to testify for gluetikv pkg (#29128) --- br/pkg/gluetikv/glue_test.go | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/br/pkg/gluetikv/glue_test.go b/br/pkg/gluetikv/glue_test.go index 71b445e70e5f9..220350f8c0dd7 100644 --- a/br/pkg/gluetikv/glue_test.go +++ b/br/pkg/gluetikv/glue_test.go @@ -1,20 +1,26 @@ +// Copyright 2021 PingCAP, Inc. +// +// 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 gluetikv import ( "testing" - . "github.com/pingcap/check" + "github.com/stretchr/testify/require" ) -type testGlue struct{} - -var _ = Suite(&testGlue{}) - -func TestT(t *testing.T) { - TestingT(t) -} - -func (r *testGlue) TestGetVersion(c *C) { +func TestGetVersion(t *testing.T) { g := Glue{} - c.Assert(g.GetVersion(), Matches, "BR(.|\n)*Release Version(.|\n)*Git Commit Hash(.|\n)*") + require.Regexp(t, "BR(.|\n)*Release Version(.|\n)*Git Commit Hash(.|\n)*", g.GetVersion()) }