Remove SCUM sqlite user projections

This commit is contained in:
npc0-hue
2026-09-14 13:41:44 +08:00
parent b1f102bafb
commit ecdca8e28b
76 changed files with 2264 additions and 1558 deletions
+12 -12
View File
@@ -1766,8 +1766,8 @@ func TestCoreServiceDispatchesDeclaredSQLiteQueryTemplate(t *testing.T) {
Action: domain.PluginBridgeActionRemoteAccessRequest,
Payload: map[string]string{
"capability": domain.JobCapabilityRemoteRunDBSQLiteQuery,
"declarationKey": "scum-db-read",
"targetKey": "scum-db.player-lookup",
"declarationKey": "game-db-read",
"targetKey": "game-db.player-lookup",
"idempotencyKey": "query-template-dispatch-1",
"input.templateKey": "players.by-id",
"input.playerId": "steam-123",
@@ -1799,9 +1799,9 @@ func TestCoreServiceDeniesUndeclaredOrMismatchedSQLiteQueryTemplateBeforeJob(t *
declarationKey string
targetKey string
}{
{name: "undeclared template", templateKey: "players.unknown", declarationKey: "scum-db-read", targetKey: "scum-db.player-lookup"},
{name: "mismatched transport", templateKey: "players.by-id", declarationKey: "other-transport", targetKey: "scum-db.player-lookup"},
{name: "mismatched target", templateKey: "players.by-id", declarationKey: "scum-db-read", targetKey: "scum-db.other"},
{name: "undeclared template", templateKey: "players.unknown", declarationKey: "game-db-read", targetKey: "game-db.player-lookup"},
{name: "mismatched transport", templateKey: "players.by-id", declarationKey: "other-transport", targetKey: "game-db.player-lookup"},
{name: "mismatched target", templateKey: "players.by-id", declarationKey: "game-db-read", targetKey: "game-db.other"},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
@@ -1874,11 +1874,11 @@ func TestCoreServiceDispatchesSQLiteExecuteSQLText(t *testing.T) {
Action: domain.PluginBridgeActionRemoteAccessRequest,
Payload: map[string]string{
"capability": domain.JobCapabilityRemoteRunDBSQLiteExecute,
"declarationKey": "scum-db-read",
"targetKey": "scum-db.player-lookup",
"declarationKey": "game-db-read",
"targetKey": "game-db.player-lookup",
"idempotencyKey": "sqlite-execute-1",
"input.mode": "execute",
"input.sqlText": "UPDATE prisoner SET stamina = 855 WHERE id = 'steam-123';",
"input.sqlText": "UPDATE players SET score = 855 WHERE id = 'player-123';",
},
})
if err != nil {
@@ -2155,9 +2155,9 @@ func createSQLiteQueryBridgeFixture(t *testing.T) (*CoreService, domain.GamePlug
DatabaseEngines: []string{"sqlite"},
}
plugin.RuntimeProfiles.TransportProfiles = append(plugin.RuntimeProfiles.TransportProfiles, domain.RuntimeTransportProfile{
Key: "scum-db-read",
Key: "game-db-read",
Kind: "sqlite",
TargetKey: "scum-db.player-lookup",
TargetKey: "game-db.player-lookup",
Capabilities: []string{capability, executeCapability},
})
plugin.GameClientBridge = domain.GameClientBridgeManifest{
@@ -2167,8 +2167,8 @@ func createSQLiteQueryBridgeFixture(t *testing.T) (*CoreService, domain.GamePlug
Title: "Player lookup",
Permission: "server.remote.access",
Engine: "sqlite",
TransportKey: "scum-db-read",
TargetKey: "scum-db.player-lookup",
TransportKey: "game-db-read",
TargetKey: "game-db.player-lookup",
ParameterSchemaRef: "schemas/queries/players.by-id.parameters.schema.json",
ResultSchemaRef: "schemas/queries/players.by-id.result.schema.json",
SQLRef: "sql/players.by-id.sql",