Chore: Rename Id to ID in alerting models (#62777)
* Chore: Rename Id to ID in alerting models * Add xorm tags for datasource * Add xorm tag for uid
This commit is contained in:
@@ -58,7 +58,7 @@ func setupFilterBenchmark(b *testing.B, numDs, numPermissions int) (db.DB, []acc
|
||||
for i := 1; i <= numDs; i++ {
|
||||
err := store.AddDataSource(context.Background(), &datasources.AddDataSourceCommand{
|
||||
Name: fmt.Sprintf("ds:%d", i),
|
||||
OrgId: 1,
|
||||
OrgID: 1,
|
||||
})
|
||||
require.NoError(b, err)
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ func TestFilter_Datasources(t *testing.T) {
|
||||
// seed 10 data sources
|
||||
for i := 1; i <= 10; i++ {
|
||||
dsStore := dsService.CreateStore(store, log.New("accesscontrol.test"))
|
||||
err := dsStore.AddDataSource(context.Background(), &datasources.AddDataSourceCommand{Name: fmt.Sprintf("ds:%d", i), Uid: fmt.Sprintf("uid%d", i)})
|
||||
err := dsStore.AddDataSource(context.Background(), &datasources.AddDataSourceCommand{Name: fmt.Sprintf("ds:%d", i), UID: fmt.Sprintf("uid%d", i)})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
|
||||
@@ -82,15 +82,15 @@ func GenerateDatasourcePermissions(b *testing.B, db *sqlstore.SQLStore, ac *stor
|
||||
dataSources := make([]int64, 0)
|
||||
for i := 0; i < dsNum; i++ {
|
||||
addDSCommand := &datasources.AddDataSourceCommand{
|
||||
OrgId: 0,
|
||||
OrgID: 0,
|
||||
Name: fmt.Sprintf("ds_%d", i),
|
||||
Type: datasources.DS_GRAPHITE,
|
||||
Access: datasources.DS_ACCESS_DIRECT,
|
||||
Url: "http://test",
|
||||
URL: "http://test",
|
||||
}
|
||||
dsStore := datasourcesService.CreateStore(db, log.New("publicdashboards.test"))
|
||||
_ = dsStore.AddDataSource(context.Background(), addDSCommand)
|
||||
dataSources = append(dataSources, addDSCommand.Result.Id)
|
||||
dataSources = append(dataSources, addDSCommand.Result.ID)
|
||||
}
|
||||
|
||||
userIds, teamIds := generateTeamsAndUsers(b, db, usersNum)
|
||||
|
||||
Reference in New Issue
Block a user