Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: use the correct testify package for advisor (#1743)

tianzhoud05b76e5675d
diff --git a/go.mod b/go.mod
index 4769506382..b9a94b7710 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,7 @@ require (
github.com/ClickHouse/clickhouse-go/v2 v2.0.7
github.com/VictoriaMetrics/fastcache v1.6.0
github.com/blang/semver/v4 v4.0.0
- github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869
+ github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/casbin/casbin/v2 v2.40.6
github.com/github/gh-ost v1.1.4
github.com/go-sql-driver/mysql v1.6.0
diff --git a/plugin/advisor/pg/advisor_syntax_test.go b/plugin/advisor/pg/advisor_syntax_test.go
index 3a34127b27..73be0d2f89 100644
--- a/plugin/advisor/pg/advisor_syntax_test.go
+++ b/plugin/advisor/pg/advisor_syntax_test.go
@@ -3,8 +3,8 @@ package pg
import (
"testing"
- "github.com/bmizerany/assert"
"github.com/bytebase/bytebase/plugin/advisor"
+ "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
_ "github.com/bytebase/bytebase/plugin/parser/engine/pg"
diff --git a/plugin/advisor/utils_for_tests.go b/plugin/advisor/utils_for_tests.go
index f52c5ab71e..b8d866decb 100644
--- a/plugin/advisor/utils_for_tests.go
+++ b/plugin/advisor/utils_for_tests.go
@@ -5,8 +5,8 @@ import (
"fmt"
"testing"
- "github.com/bmizerany/assert"
"github.com/bytebase/bytebase/plugin/advisor/catalog"
+ "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -74,6 +74,6 @@ func RunSchemaReviewRuleTests(
for _, tc := range tests {
adviceList, err := adv.Check(ctx, tc.Statement)
require.NoError(t, err)
- assert.Equal(t, tc.Want, adviceList)
+ assert.Equal(t, tc.Want, adviceList, tc.Statement)
}
}