s/Get(Master|Replica)X/Get\1/g (#29520)
Drop the legacy `X` suffix from `GetMasterX` and `GetReplicaX`. The presence of the suffix suggests there's a `non-X` version: but in fact we migrated these away a long time ago, so remove the cognitive overhead. As an aside, this additionally helps avoid trip up LLMs that interpret this as "something to fix".
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8b86e1276e
Коммит
5369f8b36b
@@ -1116,7 +1116,7 @@ func TestPermanentDeleteUser(t *testing.T) {
|
||||
bots2 := []*model.Bot{}
|
||||
|
||||
sqlStore := mainHelper.GetSQLStore()
|
||||
err1 := sqlStore.GetMasterX().Select(&bots1, "SELECT * FROM Bots")
|
||||
err1 := sqlStore.GetMaster().Select(&bots1, "SELECT * FROM Bots")
|
||||
assert.NoError(t, err1)
|
||||
assert.Equal(t, 1, len(bots1))
|
||||
|
||||
@@ -1127,7 +1127,7 @@ func TestPermanentDeleteUser(t *testing.T) {
|
||||
err = th.App.PermanentDeleteUser(th.Context, retUser1)
|
||||
assert.Nil(t, err)
|
||||
|
||||
err1 = sqlStore.GetMasterX().Select(&bots2, "SELECT * FROM Bots")
|
||||
err1 = sqlStore.GetMaster().Select(&bots2, "SELECT * FROM Bots")
|
||||
assert.NoError(t, err1)
|
||||
assert.Equal(t, 0, len(bots2))
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user