From ff53e12191a6ab4ec27ec5cbbb301c2e6046d6fd Mon Sep 17 00:00:00 2001 From: CadenGuo <411189077@qq.com> Date: Mon, 31 Aug 2020 15:29:48 +0000 Subject: [PATCH] skip strictexact operator test for db drivers other than mysql --- orm/orm_test.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/orm/orm_test.go b/orm/orm_test.go index 18e48288..b18a7082 100644 --- a/orm/orm_test.go +++ b/orm/orm_test.go @@ -822,13 +822,16 @@ func TestOperators(t *testing.T) { throwFail(t, err) throwFail(t, AssertIs(num, 1)) - num, err = qs.Filter("user_name__strictexact", "Slene").Count() - throwFail(t, err) - throwFail(t, AssertIs(num, 0)) + if dORM.Driver().Name() == "mysql" { + // Now only mysql support `strictexact` + num, err = qs.Filter("user_name__strictexact", "Slene").Count() + throwFail(t, err) + throwFail(t, AssertIs(num, 0)) - num, err = qs.Filter("user_name__strictexact", "slene").Count() - throwFail(t, err) - throwFail(t, AssertIs(num, 1)) + num, err = qs.Filter("user_name__strictexact", "slene").Count() + throwFail(t, err) + throwFail(t, AssertIs(num, 1)) + } num, err = qs.Filter("user_name__contains", "e").Count() throwFail(t, err)