Use org service instead of sqlstore (#56407)

* Use org service instead of sqlstore

* Remove methods from sqlstore

* Remove commented out code

* Fix lint

* Fix lint 2
This commit is contained in:
idafurjes
2022-10-13 08:40:46 -04:00
committed by GitHub
parent b0cb02568a
commit ef651daed2
20 changed files with 164 additions and 267 deletions
+1 -5
View File
@@ -82,13 +82,9 @@ func SetUpDatabase(t *testing.T, grafDir string) *sqlstore.SQLStore {
sqlStore := sqlstore.InitTestDB(t, sqlstore.InitTestDBOpt{
EnsureDefaultOrgAndUser: true,
})
// We need the main org, since it's used for anonymous access
org, err := sqlStore.GetOrgByName(sqlstore.MainOrgName)
require.NoError(t, err)
require.NotNil(t, org)
// Make sure changes are synced with other goroutines
err = sqlStore.Sync()
err := sqlStore.Sync()
require.NoError(t, err)
return sqlStore