Chore: Make Cfg field private in SQLStore (#85593)
* make cfg private in sqlstore * fix db init in tests * fix case * fix folder test init * fix imports * make another Cfg private * remove another Cfg * remove unused variable * use store cfg, it has side-effects * fix mutated cfg in tests
This commit is contained in:
@@ -14,13 +14,13 @@ func TestIntegrationGetOrCreateOrg(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("Skipping integration test in short mode")
|
||||
}
|
||||
ss := InitTestDB(t)
|
||||
ss, _ := InitTestDB(t)
|
||||
|
||||
err := ss.WithNewDbSession(context.Background(), func(sess *DBSession) error {
|
||||
// Create the org only:
|
||||
ss.Cfg.AutoAssignOrg = true
|
||||
ss.Cfg.DisableInitAdminCreation = true
|
||||
ss.Cfg.AutoAssignOrgId = 1
|
||||
ss.cfg.AutoAssignOrg = true
|
||||
ss.cfg.DisableInitAdminCreation = true
|
||||
ss.cfg.AutoAssignOrgId = 1
|
||||
createdOrgID, err := ss.getOrCreateOrg(sess, mainOrgName)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, int64(1), createdOrgID)
|
||||
|
||||
Reference in New Issue
Block a user