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
@@ -95,12 +95,12 @@ func TestEnsureInstallationDate(t *testing.T) {
|
||||
for _, tc := range tt {
|
||||
t.Run(tc.Name, func(t *testing.T) {
|
||||
sqlStore := th.GetSqlStore()
|
||||
sqlStore.GetMasterX().Exec("DELETE FROM Users")
|
||||
sqlStore.GetMaster().Exec("DELETE FROM Users")
|
||||
|
||||
for _, createAt := range tc.UsersCreationDates {
|
||||
user := th.CreateUser()
|
||||
user.CreateAt = createAt
|
||||
sqlStore.GetMasterX().Exec("UPDATE Users SET CreateAt = ? WHERE Id = ?", createAt, user.Id)
|
||||
sqlStore.GetMaster().Exec("UPDATE Users SET CreateAt = ? WHERE Id = ?", createAt, user.Id)
|
||||
}
|
||||
|
||||
if tc.PrevInstallationDate == nil {
|
||||
@@ -125,7 +125,7 @@ func TestEnsureInstallationDate(t *testing.T) {
|
||||
assert.True(t, *tc.ExpectedInstallationDate <= value && *tc.ExpectedInstallationDate+1000 >= value)
|
||||
}
|
||||
|
||||
sqlStore.GetMasterX().Exec("DELETE FROM Users")
|
||||
sqlStore.GetMaster().Exec("DELETE FROM Users")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user