Remove use of dialect.LikeStr (#104460)
* Fix TestIntegrationUpdatingProvisionionedDashboards* tests when running on Spanner by fixing case-insensitive search for dashboard title. * Fix use of case-insensitive LIKE when running on Spanner. * Fix use of LikeStr in anonstore. * Fix use of LikeStr in ngalert/store and org/orgimpl. * Fix use of LikeStr in queryhistory search. * Fix use of LikeStr in serviceaccounts. * Fix use of LikeStr in serviceaccounts. * Fix use of LikeStr in services/team. * Remove LikeStr method.
This commit is contained in:
@@ -307,7 +307,27 @@ func TestIntegrationDeviceService_SearchDevice(t *testing.T) {
|
||||
UserAgent: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
{
|
||||
name: "device with IPv6 address and case-insensitive search",
|
||||
insertDevices: []*anonstore.Device{
|
||||
{
|
||||
DeviceID: "32mdo31deeqwes",
|
||||
ClientIP: "[2001:db8:3333:4444:cccc:DDDD:eeee:FFFF]:1000", // Using mixed-case to test case insensitivity
|
||||
},
|
||||
},
|
||||
searchQuery: anonstore.SearchDeviceQuery{
|
||||
Query: "CCCC", // Different case to test case insensitivity
|
||||
Page: 1,
|
||||
Limit: 50,
|
||||
From: fixedTime,
|
||||
To: fixedTime.Add(1 * time.Hour),
|
||||
},
|
||||
expectedCount: 1,
|
||||
expectedDevice: &anonstore.Device{
|
||||
DeviceID: "32mdo31deeqwes",
|
||||
ClientIP: "[2001:db8:3333:4444:cccc:DDDD:eeee:FFFF]:1000",
|
||||
},
|
||||
}}
|
||||
store := db.InitTestDB(t)
|
||||
cfg := setting.NewCfg()
|
||||
cfg.Anonymous.Enabled = true
|
||||
|
||||
Reference in New Issue
Block a user