Chore: implement sqlx into tag service (#55908)

* add sqlx store to tag service

* add sqlx into tag service

* fix test

* change to camal cases

* change in xorm camal case
This commit is contained in:
ying-jeanne authored and GitHub committed 2022-09-28 08:23:40 -04:00
1 parent 8869d6fe7a
commit 2472777ce2
23 files changed
+155 -78

No files matched your search

@@ -30,7 +30,7 @@ func TestIntegrationAnnotations(t *testing.T) {
}
sql := sqlstore.InitTestDB(t)
var maximumTagsLength int64 = 60
repo := xormRepositoryImpl{db: sql, cfg: setting.NewCfg(), log: log.New("annotation.test"), tagService: tagimpl.ProvideService(sql), maximumTagsLength: maximumTagsLength}
repo := xormRepositoryImpl{db: sql, cfg: setting.NewCfg(), log: log.New("annotation.test"), tagService: tagimpl.ProvideService(sql, sql.Cfg), maximumTagsLength: maximumTagsLength}
testUser := &user.SignedInUser{
OrgID: 1,
@@ -55,7 +55,7 @@ func TestIntegrationAnnotations(t *testing.T) {
assert.NoError(t, err)
})
dashboardStore := dashboardstore.ProvideDashboardStore(sql, featuremgmt.WithFeatures(), tagimpl.ProvideService(sql))
dashboardStore := dashboardstore.ProvideDashboardStore(sql, featuremgmt.WithFeatures(), tagimpl.ProvideService(sql, sql.Cfg))
testDashboard1 := models.SaveDashboardCommand{
UserId: 1,
@@ -409,8 +409,8 @@ func TestIntegrationAnnotationListingWithRBAC(t *testing.T) {
}
sql := sqlstore.InitTestDB(t, sqlstore.InitTestDBOpt{})
var maximumTagsLength int64 = 60
repo := xormRepositoryImpl{db: sql, cfg: setting.NewCfg(), log: log.New("annotation.test"), tagService: tagimpl.ProvideService(sql), maximumTagsLength: maximumTagsLength}
dashboardStore := dashboardstore.ProvideDashboardStore(sql, featuremgmt.WithFeatures(), tagimpl.ProvideService(sql))
repo := xormRepositoryImpl{db: sql, cfg: setting.NewCfg(), log: log.New("annotation.test"), tagService: tagimpl.ProvideService(sql, sql.Cfg), maximumTagsLength: maximumTagsLength}
dashboardStore := dashboardstore.ProvideDashboardStore(sql, featuremgmt.WithFeatures(), tagimpl.ProvideService(sql, sql.Cfg))
testDashboard1 := models.SaveDashboardCommand{
UserId: 1,