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".
Этот коммит содержится в:
Jesse Hallam
2024-12-10 09:57:19 -04:00
коммит произвёл GitHub
родитель 8b86e1276e
Коммит 5369f8b36b
77 изменённых файлов: 892 добавлений и 892 удалений

Просмотреть файл

@@ -415,7 +415,7 @@ func TestCheckParentChildIntegrity(t *testing.T) {
func TestCheckChannelsCommandWebhooksIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkChannelsCommandWebhooksIntegrity(store)
@@ -442,7 +442,7 @@ func TestCheckChannelsCommandWebhooksIntegrity(t *testing.T) {
func TestCheckChannelsChannelMemberHistoryIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkChannelsChannelMemberHistoryIntegrity(store)
@@ -473,7 +473,7 @@ func TestCheckChannelsChannelMemberHistoryIntegrity(t *testing.T) {
func TestCheckChannelsChannelMembersIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkChannelsChannelMembersIntegrity(store)
@@ -501,7 +501,7 @@ func TestCheckChannelsChannelMembersIntegrity(t *testing.T) {
func TestCheckChannelsIncomingWebhooksIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkChannelsIncomingWebhooksIntegrity(store)
@@ -529,7 +529,7 @@ func TestCheckChannelsIncomingWebhooksIntegrity(t *testing.T) {
func TestCheckChannelsOutgoingWebhooksIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkChannelsOutgoingWebhooksIntegrity(store)
@@ -559,7 +559,7 @@ func TestCheckChannelsOutgoingWebhooksIntegrity(t *testing.T) {
func TestCheckChannelsPostsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkChannelsPostsIntegrity(store)
@@ -586,7 +586,7 @@ func TestCheckChannelsPostsIntegrity(t *testing.T) {
func TestCheckCommandsCommandWebhooksIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkCommandsCommandWebhooksIntegrity(store)
@@ -614,7 +614,7 @@ func TestCheckCommandsCommandWebhooksIntegrity(t *testing.T) {
func TestCheckPostsFileInfoIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkPostsFileInfoIntegrity(store)
@@ -642,7 +642,7 @@ func TestCheckPostsFileInfoIntegrity(t *testing.T) {
func TestCheckPostsPostsRootIdIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkPostsPostsRootIdIntegrity(store)
@@ -675,7 +675,7 @@ func TestCheckPostsPostsRootIdIntegrity(t *testing.T) {
func TestCheckPostsReactionsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkPostsReactionsIntegrity(store)
@@ -702,7 +702,7 @@ func TestCheckPostsReactionsIntegrity(t *testing.T) {
func TestCheckSchemesChannelsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkSchemesChannelsIntegrity(store)
@@ -733,7 +733,7 @@ func TestCheckSchemesChannelsIntegrity(t *testing.T) {
func TestCheckSchemesTeamsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkSchemesTeamsIntegrity(store)
@@ -764,7 +764,7 @@ func TestCheckSchemesTeamsIntegrity(t *testing.T) {
func TestCheckSessionsAuditsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkSessionsAuditsIntegrity(store)
@@ -795,7 +795,7 @@ func TestCheckSessionsAuditsIntegrity(t *testing.T) {
func TestCheckTeamsChannelsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkTeamsChannelsIntegrity(store)
@@ -871,7 +871,7 @@ func TestCheckTeamsChannelsIntegrity(t *testing.T) {
func TestCheckTeamsCommandsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkTeamsCommandsIntegrity(store)
@@ -899,7 +899,7 @@ func TestCheckTeamsCommandsIntegrity(t *testing.T) {
func TestCheckTeamsIncomingWebhooksIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkTeamsIncomingWebhooksIntegrity(store)
@@ -927,7 +927,7 @@ func TestCheckTeamsIncomingWebhooksIntegrity(t *testing.T) {
func TestCheckTeamsOutgoingWebhooksIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkTeamsOutgoingWebhooksIntegrity(store)
@@ -955,7 +955,7 @@ func TestCheckTeamsOutgoingWebhooksIntegrity(t *testing.T) {
func TestCheckTeamsTeamMembersIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkTeamsTeamMembersIntegrity(store)
@@ -983,7 +983,7 @@ func TestCheckTeamsTeamMembersIntegrity(t *testing.T) {
func TestCheckUsersAuditsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersAuditsIntegrity(store)
@@ -1013,7 +1013,7 @@ func TestCheckUsersAuditsIntegrity(t *testing.T) {
func TestCheckUsersCommandWebhooksIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersCommandWebhooksIntegrity(store)
@@ -1041,7 +1041,7 @@ func TestCheckUsersCommandWebhooksIntegrity(t *testing.T) {
func TestCheckUsersChannelsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersChannelsIntegrity(store)
@@ -1068,7 +1068,7 @@ func TestCheckUsersChannelsIntegrity(t *testing.T) {
func TestCheckUsersChannelMemberHistoryIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersChannelMemberHistoryIntegrity(store)
@@ -1098,7 +1098,7 @@ func TestCheckUsersChannelMemberHistoryIntegrity(t *testing.T) {
func TestCheckUsersChannelMembersIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersChannelMembersIntegrity(store)
@@ -1128,7 +1128,7 @@ func TestCheckUsersChannelMembersIntegrity(t *testing.T) {
func TestCheckUsersCommandsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersCommandsIntegrity(store)
@@ -1156,7 +1156,7 @@ func TestCheckUsersCommandsIntegrity(t *testing.T) {
func TestCheckUsersCompliancesIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersCompliancesIntegrity(store)
@@ -1186,7 +1186,7 @@ func TestCheckUsersCompliancesIntegrity(t *testing.T) {
func TestCheckUsersEmojiIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersEmojiIntegrity(store)
@@ -1216,7 +1216,7 @@ func TestCheckUsersEmojiIntegrity(t *testing.T) {
func TestCheckUsersFileInfoIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersFileInfoIntegrity(store)
@@ -1246,7 +1246,7 @@ func TestCheckUsersFileInfoIntegrity(t *testing.T) {
func TestCheckUsersIncomingWebhooksIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersIncomingWebhooksIntegrity(store)
@@ -1274,7 +1274,7 @@ func TestCheckUsersIncomingWebhooksIntegrity(t *testing.T) {
func TestCheckUsersOAuthAccessDataIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersOAuthAccessDataIntegrity(store)
@@ -1304,7 +1304,7 @@ func TestCheckUsersOAuthAccessDataIntegrity(t *testing.T) {
func TestCheckUsersOAuthAppsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersOAuthAppsIntegrity(store)
@@ -1334,7 +1334,7 @@ func TestCheckUsersOAuthAppsIntegrity(t *testing.T) {
func TestCheckUsersOAuthAuthDataIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersOAuthAuthDataIntegrity(store)
@@ -1364,7 +1364,7 @@ func TestCheckUsersOAuthAuthDataIntegrity(t *testing.T) {
func TestCheckUsersOutgoingWebhooksIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersOutgoingWebhooksIntegrity(store)
@@ -1392,7 +1392,7 @@ func TestCheckUsersOutgoingWebhooksIntegrity(t *testing.T) {
func TestCheckUsersPostsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersPostsIntegrity(store)
@@ -1419,7 +1419,7 @@ func TestCheckUsersPostsIntegrity(t *testing.T) {
func TestCheckUsersPreferencesIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersPreferencesIntegrity(store)
@@ -1465,7 +1465,7 @@ func TestCheckUsersPreferencesIntegrity(t *testing.T) {
func TestCheckUsersReactionsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersReactionsIntegrity(store)
@@ -1494,7 +1494,7 @@ func TestCheckUsersReactionsIntegrity(t *testing.T) {
func TestCheckUsersSessionsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersSessionsIntegrity(store)
@@ -1522,7 +1522,7 @@ func TestCheckUsersSessionsIntegrity(t *testing.T) {
func TestCheckUsersStatusIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersStatusIntegrity(store)
@@ -1551,7 +1551,7 @@ func TestCheckUsersStatusIntegrity(t *testing.T) {
func TestCheckUsersTeamMembersIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersTeamMembersIntegrity(store)
@@ -1581,7 +1581,7 @@ func TestCheckUsersTeamMembersIntegrity(t *testing.T) {
func TestCheckUsersUserAccessTokensIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkUsersUserAccessTokensIntegrity(store)
@@ -1611,7 +1611,7 @@ func TestCheckUsersUserAccessTokensIntegrity(t *testing.T) {
func TestCheckThreadsTeamsIntegrity(t *testing.T) {
StoreTest(t, func(t *testing.T, rctx request.CTX, ss store.Store) {
store := ss.(*SqlStore)
dbmap := store.GetMasterX()
dbmap := store.GetMaster()
t.Run("should generate a report with no records", func(t *testing.T) {
result := checkThreadsTeamsIntegrity(store)