Skip to content

Commit

Permalink
br: migrate test-infra to testify for gluetikv pkg
Browse files Browse the repository at this point in the history
This closes #28168 .

Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Oct 26, 2021
1 parent 19a2b3c commit f17182b
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions br/pkg/gluetikv/glue_test.go
Original file line number Diff line number Diff line change
@@ -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())
}

0 comments on commit f17182b

Please sign in to comment.