Merge pull request 'chore(cleanup): purge /command residuals — fakeEngine, canon golden, openapi' (#75) from feature/post-command-cleanup into development
Deploy · Dev / deploy (push) Successful in 47s
Tests · Go / test (push) Successful in 2m6s
Tests · Integration / integration (push) Successful in 1m51s
Tests · UI / test (push) Successful in 3m20s

This commit was merged in pull request #75.
This commit is contained in:
2026-05-30 17:54:47 +00:00
11 changed files with 67 additions and 63 deletions
+10 -10
View File
@@ -29,8 +29,8 @@ func TestGetBattleValidation(t *testing.T) {
{"Invalid uuid", "0", invalidId, http.StatusBadRequest}, {"Invalid uuid", "0", invalidId, http.StatusBadRequest},
} { } {
t.Run(tc.description, func(t *testing.T) { t.Run(tc.description, func(t *testing.T) {
e := &dummyExecutor{} e := &fakeEngine{}
r := setupRouterExecutor(e) r := setupRouterEngine(e)
w := httptest.NewRecorder() w := httptest.NewRecorder()
path := fmt.Sprintf("/api/v1/battle/%s/%s", tc.turn, tc.battleID) path := fmt.Sprintf("/api/v1/battle/%s/%s", tc.turn, tc.battleID)
@@ -81,11 +81,11 @@ func TestGetBattleFound(t *testing.T) {
{Attacker: 0, AttackerShipClass: 10, Defender: 1, DefenderShipClass: 20, Destroyed: true}, {Attacker: 0, AttackerShipClass: 10, Defender: 1, DefenderShipClass: 20, Destroyed: true},
}, },
} }
e := &dummyExecutor{ e := &fakeEngine{
FetchBattleResult: stored, FetchBattleResult: stored,
FetchBattleOK: true, FetchBattleOK: true,
} }
r := setupRouterExecutor(e) r := setupRouterEngine(e)
w := httptest.NewRecorder() w := httptest.NewRecorder()
path := fmt.Sprintf("/api/v1/battle/%d/%s", 7, id.String()) path := fmt.Sprintf("/api/v1/battle/%d/%s", 7, id.String())
@@ -111,11 +111,11 @@ func TestGetBattleFound(t *testing.T) {
func TestGetBattleTurnZero(t *testing.T) { func TestGetBattleTurnZero(t *testing.T) {
id := uuid.New() id := uuid.New()
e := &dummyExecutor{ e := &fakeEngine{
FetchBattleResult: &report.BattleReport{ID: id}, FetchBattleResult: &report.BattleReport{ID: id},
FetchBattleOK: true, FetchBattleOK: true,
} }
r := setupRouterExecutor(e) r := setupRouterEngine(e)
w := httptest.NewRecorder() w := httptest.NewRecorder()
req, _ := http.NewRequest(http.MethodGet, fmt.Sprintf("/api/v1/battle/0/%s", id.String()), nil) req, _ := http.NewRequest(http.MethodGet, fmt.Sprintf("/api/v1/battle/0/%s", id.String()), nil)
@@ -128,8 +128,8 @@ func TestGetBattleTurnZero(t *testing.T) {
func TestGetBattleNotFound(t *testing.T) { func TestGetBattleNotFound(t *testing.T) {
id := uuid.New() id := uuid.New()
e := &dummyExecutor{FetchBattleOK: false} e := &fakeEngine{FetchBattleOK: false}
r := setupRouterExecutor(e) r := setupRouterEngine(e)
w := httptest.NewRecorder() w := httptest.NewRecorder()
req, _ := http.NewRequest(http.MethodGet, fmt.Sprintf("/api/v1/battle/3/%s", id.String()), nil) req, _ := http.NewRequest(http.MethodGet, fmt.Sprintf("/api/v1/battle/3/%s", id.String()), nil)
@@ -141,8 +141,8 @@ func TestGetBattleNotFound(t *testing.T) {
} }
func TestGetBattleEngineError(t *testing.T) { func TestGetBattleEngineError(t *testing.T) {
e := &dummyExecutor{FetchBattleErr: errors.New("engine boom")} e := &fakeEngine{FetchBattleErr: errors.New("engine boom")}
r := setupRouterExecutor(e) r := setupRouterEngine(e)
w := httptest.NewRecorder() w := httptest.NewRecorder()
req, _ := http.NewRequest(http.MethodGet, fmt.Sprintf("/api/v1/battle/3/%s", uuid.NewString()), nil) req, _ := http.NewRequest(http.MethodGet, fmt.Sprintf("/api/v1/battle/3/%s", uuid.NewString()), nil)
+23 -23
View File
@@ -68,8 +68,8 @@ func TestOrderRaceQuit(t *testing.T) {
payload = &rest.Command{ payload = &rest.Command{
Actor: commandDefaultActor, Actor: commandDefaultActor,
} }
exec := &dummyExecutor{} exec := &fakeEngine{}
emptyRouter := setupRouterExecutor(exec) emptyRouter := setupRouterEngine(exec)
w = httptest.NewRecorder() w = httptest.NewRecorder()
req, _ = http.NewRequest(apiCommandMethod, apiOrderPath, asBody(payload)) req, _ = http.NewRequest(apiCommandMethod, apiOrderPath, asBody(payload))
@@ -927,8 +927,8 @@ func TestOrderPlanetRouteRemove(t *testing.T) {
} }
func TestMultipleCommandOrder(t *testing.T) { func TestMultipleCommandOrder(t *testing.T) {
e := newExecutor() e := newFakeEngine()
r := setupRouterExecutor(e) r := setupRouterEngine(e)
payload := &rest.Command{ payload := &rest.Command{
Actor: commandDefaultActor, Actor: commandDefaultActor,
@@ -951,11 +951,11 @@ func TestMultipleCommandOrder(t *testing.T) {
assert.Equal(t, commandNoErrorsStatus, w.Code, w.Body) assert.Equal(t, commandNoErrorsStatus, w.Code, w.Body)
assert.Equal(t, 2, e.(*dummyExecutor).CommandsExecuted) assert.Equal(t, 2, e.(*fakeEngine).CommandsExecuted)
} }
func TestPutOrderResponseBody(t *testing.T) { func TestPutOrderResponseBody(t *testing.T) {
e := &dummyExecutor{ e := &fakeEngine{
ValidateOrderResult: &order.UserGamesOrder{ ValidateOrderResult: &order.UserGamesOrder{
GameID: uuid.New(), GameID: uuid.New(),
UpdatedAt: 1700, UpdatedAt: 1700,
@@ -967,7 +967,7 @@ func TestPutOrderResponseBody(t *testing.T) {
}, },
}, },
} }
r := setupRouterExecutor(e) r := setupRouterEngine(e)
payload := &rest.Command{ payload := &rest.Command{
Actor: commandDefaultActor, Actor: commandDefaultActor,
@@ -997,8 +997,8 @@ func TestPutOrderResponseBody(t *testing.T) {
} }
func TestPutOrderEngineError(t *testing.T) { func TestPutOrderEngineError(t *testing.T) {
e := &dummyExecutor{ValidateOrderErr: errors.New("engine boom")} e := &fakeEngine{ValidateOrderErr: errors.New("engine boom")}
r := setupRouterExecutor(e) r := setupRouterEngine(e)
payload := &rest.Command{ payload := &rest.Command{
Actor: commandDefaultActor, Actor: commandDefaultActor,
@@ -1054,8 +1054,8 @@ func TestPutOrderPerCommandRejection(t *testing.T) {
}, },
}, },
} }
executor := &dummyExecutor{ValidateOrderResult: result} executor := &fakeEngine{ValidateOrderResult: result}
r := setupRouterExecutor(executor) r := setupRouterEngine(executor)
payload := &rest.Command{ payload := &rest.Command{
Actor: commandDefaultActor, Actor: commandDefaultActor,
@@ -1112,8 +1112,8 @@ func TestPutOrderPerCommandRejection(t *testing.T) {
// *GenericError on the input shelf, which must map to HTTP 400 with // *GenericError on the input shelf, which must map to HTTP 400 with
// the `{"generic_error","code"}` envelope rather than 500. // the `{"generic_error","code"}` envelope rather than 500.
func TestPutOrderStructuralRejection(t *testing.T) { func TestPutOrderStructuralRejection(t *testing.T) {
executor := &dummyExecutor{ValidateOrderErr: e.NewQuitCommandFollowedByCommandError()} executor := &fakeEngine{ValidateOrderErr: e.NewQuitCommandFollowedByCommandError()}
r := setupRouterExecutor(executor) r := setupRouterEngine(executor)
payload := &rest.Command{ payload := &rest.Command{
Actor: commandDefaultActor, Actor: commandDefaultActor,
@@ -1152,8 +1152,8 @@ func TestGetOrderQueryValidation(t *testing.T) {
{"Non-numeric turn", "?player=Race_01&turn=abc", http.StatusBadRequest}, {"Non-numeric turn", "?player=Race_01&turn=abc", http.StatusBadRequest},
} { } {
t.Run(tc.description, func(t *testing.T) { t.Run(tc.description, func(t *testing.T) {
e := &dummyExecutor{} e := &fakeEngine{}
r := setupRouterExecutor(e) r := setupRouterEngine(e)
w := httptest.NewRecorder() w := httptest.NewRecorder()
req, _ := http.NewRequest(http.MethodGet, apiOrderPath+tc.query, nil) req, _ := http.NewRequest(http.MethodGet, apiOrderPath+tc.query, nil)
@@ -1176,11 +1176,11 @@ func TestGetOrderFound(t *testing.T) {
}, },
}, },
} }
e := &dummyExecutor{ e := &fakeEngine{
FetchOrderResult: stored, FetchOrderResult: stored,
FetchOrderOK: true, FetchOrderOK: true,
} }
r := setupRouterExecutor(e) r := setupRouterEngine(e)
w := httptest.NewRecorder() w := httptest.NewRecorder()
req, _ := http.NewRequest(http.MethodGet, apiOrderPath+"?player=Race_01&turn=3", nil) req, _ := http.NewRequest(http.MethodGet, apiOrderPath+"?player=Race_01&turn=3", nil)
@@ -1202,11 +1202,11 @@ func TestGetOrderFound(t *testing.T) {
} }
func TestGetOrderTurnDefaultsToZero(t *testing.T) { func TestGetOrderTurnDefaultsToZero(t *testing.T) {
e := &dummyExecutor{ e := &fakeEngine{
FetchOrderResult: &order.UserGamesOrder{GameID: uuid.New(), UpdatedAt: 1, Commands: []order.DecodableCommand{}}, FetchOrderResult: &order.UserGamesOrder{GameID: uuid.New(), UpdatedAt: 1, Commands: []order.DecodableCommand{}},
FetchOrderOK: true, FetchOrderOK: true,
} }
r := setupRouterExecutor(e) r := setupRouterEngine(e)
w := httptest.NewRecorder() w := httptest.NewRecorder()
req, _ := http.NewRequest(http.MethodGet, apiOrderPath+"?player=Race_01", nil) req, _ := http.NewRequest(http.MethodGet, apiOrderPath+"?player=Race_01", nil)
@@ -1217,8 +1217,8 @@ func TestGetOrderTurnDefaultsToZero(t *testing.T) {
} }
func TestGetOrderNotFound(t *testing.T) { func TestGetOrderNotFound(t *testing.T) {
e := &dummyExecutor{FetchOrderOK: false} e := &fakeEngine{FetchOrderOK: false}
r := setupRouterExecutor(e) r := setupRouterEngine(e)
w := httptest.NewRecorder() w := httptest.NewRecorder()
req, _ := http.NewRequest(http.MethodGet, apiOrderPath+"?player=Race_01&turn=2", nil) req, _ := http.NewRequest(http.MethodGet, apiOrderPath+"?player=Race_01&turn=2", nil)
@@ -1231,8 +1231,8 @@ func TestGetOrderNotFound(t *testing.T) {
} }
func TestGetOrderEngineError(t *testing.T) { func TestGetOrderEngineError(t *testing.T) {
e := &dummyExecutor{FetchOrderErr: errors.New("engine boom")} e := &fakeEngine{FetchOrderErr: errors.New("engine boom")}
r := setupRouterExecutor(e) r := setupRouterEngine(e)
w := httptest.NewRecorder() w := httptest.NewRecorder()
req, _ := http.NewRequest(http.MethodGet, apiOrderPath+"?player=Race_01&turn=0", nil) req, _ := http.NewRequest(http.MethodGet, apiOrderPath+"?player=Race_01&turn=0", nil)
+13 -13
View File
@@ -31,7 +31,7 @@ func id() string {
return uuid.New().String() return uuid.New().String()
} }
type dummyExecutor struct { type fakeEngine struct {
CommandsExecuted int CommandsExecuted int
// ValidateOrderResult, when non-nil, is returned from ValidateOrder. // ValidateOrderResult, when non-nil, is returned from ValidateOrder.
@@ -55,7 +55,7 @@ type dummyExecutor struct {
FetchBattleErr error FetchBattleErr error
} }
func (e *dummyExecutor) ValidateOrder(actor string, cmd ...order.DecodableCommand) (*order.UserGamesOrder, error) { func (e *fakeEngine) ValidateOrder(actor string, cmd ...order.DecodableCommand) (*order.UserGamesOrder, error) {
e.CommandsExecuted = len(cmd) e.CommandsExecuted = len(cmd)
if e.ValidateOrderErr != nil { if e.ValidateOrderErr != nil {
return nil, e.ValidateOrderErr return nil, e.ValidateOrderErr
@@ -70,48 +70,48 @@ func (e *dummyExecutor) ValidateOrder(actor string, cmd ...order.DecodableComman
}, nil }, nil
} }
func (e *dummyExecutor) FetchOrder(actor string, turn uint) (*order.UserGamesOrder, bool, error) { func (e *fakeEngine) FetchOrder(actor string, turn uint) (*order.UserGamesOrder, bool, error) {
e.FetchOrderActor = actor e.FetchOrderActor = actor
e.FetchOrderTurn = turn e.FetchOrderTurn = turn
return e.FetchOrderResult, e.FetchOrderOK, e.FetchOrderErr return e.FetchOrderResult, e.FetchOrderOK, e.FetchOrderErr
} }
func (e *dummyExecutor) FetchBattle(turn uint, ID uuid.UUID) (*report.BattleReport, bool, error) { func (e *fakeEngine) FetchBattle(turn uint, ID uuid.UUID) (*report.BattleReport, bool, error) {
e.FetchBattleTurn = turn e.FetchBattleTurn = turn
e.FetchBattleID = ID e.FetchBattleID = ID
return e.FetchBattleResult, e.FetchBattleOK, e.FetchBattleErr return e.FetchBattleResult, e.FetchBattleOK, e.FetchBattleErr
} }
func (e *dummyExecutor) GenerateGame(gameID uuid.UUID, races []string) (game.State, error) { func (e *fakeEngine) GenerateGame(gameID uuid.UUID, races []string) (game.State, error) {
return game.State{ID: gameID}, nil return game.State{ID: gameID}, nil
} }
func (e *dummyExecutor) GenerateTurn() (game.State, error) { func (e *fakeEngine) GenerateTurn() (game.State, error) {
return game.State{}, nil return game.State{}, nil
} }
func (e *dummyExecutor) BanishRace(raceName string) error { func (e *fakeEngine) BanishRace(raceName string) error {
return nil return nil
} }
func (e *dummyExecutor) GameState() (game.State, error) { func (e *fakeEngine) GameState() (game.State, error) {
return game.State{}, nil return game.State{}, nil
} }
func (e *dummyExecutor) LoadReport(actor string, turn uint) (*report.Report, error) { func (e *fakeEngine) LoadReport(actor string, turn uint) (*report.Report, error) {
return &report.Report{}, nil return &report.Report{}, nil
} }
func setupRouter() *gin.Engine { func setupRouter() *gin.Engine {
return setupRouterExecutor(newExecutor()) return setupRouterEngine(newFakeEngine())
} }
func setupRouterExecutor(e handler.Engine) *gin.Engine { func setupRouterEngine(e handler.Engine) *gin.Engine {
return router.SetupRouter(e) return router.SetupRouter(e)
} }
func newExecutor() handler.Engine { func newFakeEngine() handler.Engine {
return &dummyExecutor{} return &fakeEngine{}
} }
// newService builds a real controller.Service backed by a storage directory, // newService builds a real controller.Service backed by a storage directory,
+9 -6
View File
@@ -436,21 +436,24 @@ components:
CommandRequest: CommandRequest:
type: object type: object
description: | description: |
Batch command payload. `actor` identifies the race submitting the commands. Order payload for `PUT /api/v1/order`. `actor` identifies the race
Each element of `cmd` is a polymorphic command object discriminated by the submitting the order. Each element of `cmd` is a polymorphic command
`@type` field. At least one command is required. object discriminated by the `@type` field. An empty `cmd` array is
valid: it clears the player's stored order for the turn (equivalent to
removing every command).
required: required:
- actor - actor
- cmd - cmd
properties: properties:
actor: actor:
type: string type: string
description: Race name of the actor submitting the commands. Must be non-blank. description: Race name of the actor submitting the order. Must be non-blank.
minLength: 1 minLength: 1
cmd: cmd:
type: array type: array
description: One or more commands to execute in order. description: >-
minItems: 1 The player's commands, applied in submission order at turn
generation. May be empty to clear the stored order.
items: items:
$ref: "#/components/schemas/Command" $ref: "#/components/schemas/Command"
UserGamesOrder: UserGamesOrder:
+2 -1
View File
@@ -275,7 +275,8 @@ func TestGameOpenAPISpecFreezesCommandRequest(t *testing.T) {
cmdSchema := schema.Value.Properties["cmd"] cmdSchema := schema.Value.Properties["cmd"]
require.NotNil(t, cmdSchema, "CommandRequest.cmd schema must exist") require.NotNil(t, cmdSchema, "CommandRequest.cmd schema must exist")
require.Equal(t, uint64(1), cmdSchema.Value.MinItems, "CommandRequest.cmd minItems must be 1") require.Zero(t, cmdSchema.Value.MinItems,
"CommandRequest.cmd must allow an empty batch — an empty order clears the player's stored order")
} }
func TestGameOpenAPISpecFreezesGetBattleOperation(t *testing.T) { func TestGameOpenAPISpecFreezesGetBattleOperation(t *testing.T) {
+2 -2
View File
@@ -469,7 +469,7 @@ Acceptance criteria:
- canonical-bytes output matches gateway-side output byte-for-byte - canonical-bytes output matches gateway-side output byte-for-byte
for the three Phase-3 message types (`user.account.get`, for the three Phase-3 message types (`user.account.get`,
`lobby.my.games.list`, `user.games.command`); `lobby.my.games.list`, `user.games.order`);
- a request signed by `ui/core` is accepted by the gateway's own - a request signed by `ui/core` is accepted by the gateway's own
verifier in a unit test (`TestParityRequestSignedByUICoreAcceptedByGateway`); verifier in a unit test (`TestParityRequestSignedByUICoreAcceptedByGateway`);
- a response signed by `gateway/authn`'s `Ed25519ResponseSigner` is - a response signed by `gateway/authn`'s `Ed25519ResponseSigner` is
@@ -648,7 +648,7 @@ Acceptance criteria (met):
KB measured); KB measured);
- `WasmCore.signRequest` produces canonical bytes byte-for-byte - `WasmCore.signRequest` produces canonical bytes byte-for-byte
identical to the gateway-side fixtures for three message types identical to the gateway-side fixtures for three message types
(`request_user_account_get`, `request_user_games_command`, (`request_user_account_get`, `request_user_games_order`,
`request_lobby_my_games_list`); `request_lobby_my_games_list`);
- `WasmCore` exposes the same `Core` TypeScript types future - `WasmCore` exposes the same `Core` TypeScript types future
`WailsCore` and `CapacitorCore` adapters will satisfy. `WailsCore` and `CapacitorCore` adapters will satisfy.
+1 -1
View File
@@ -130,7 +130,7 @@ The `canon` test suite combines:
- byte-equality on golden JSON fixtures under - byte-equality on golden JSON fixtures under
`canon/testdata/` for three request types `canon/testdata/` for three request types
(`user.account.get`, `lobby.my.games.list`, (`user.account.get`, `lobby.my.games.list`,
`user.games.command`), one response (`ok`), and one event `user.games.order`), one response (`ok`), and one event
(`gateway.server_time`); (`gateway.server_time`);
- mutation tests proving every signed field is bound into the - mutation tests proving every signed field is bound into the
signature; signature;
+2 -2
View File
@@ -71,7 +71,7 @@ func TestBuildRequestSigningInputChangesWhenSignedFieldChanges(t *testing.T) {
base := canon.RequestSigningFields{ base := canon.RequestSigningFields{
ProtocolVersion: "v1", ProtocolVersion: "v1",
DeviceSessionID: "device-session-123", DeviceSessionID: "device-session-123",
MessageType: "user.games.command", MessageType: "user.games.order",
TimestampMS: 123456789, TimestampMS: 123456789,
RequestID: "request-123", RequestID: "request-123",
PayloadHash: sha256Sum([]byte("payload")), PayloadHash: sha256Sum([]byte("payload")),
@@ -143,7 +143,7 @@ func TestRequestCanonicalBytesFixtures(t *testing.T) {
fixtures := []string{ fixtures := []string{
"request_user_account_get.json", "request_user_account_get.json",
"request_lobby_my_games_list.json", "request_lobby_my_games_list.json",
"request_user_games_command.json", "request_user_games_order.json",
} }
for _, name := range fixtures { for _, name := range fixtures {
+1 -1
View File
@@ -22,7 +22,7 @@ func TestVerifyRequestSignature(t *testing.T) {
fields := canon.RequestSigningFields{ fields := canon.RequestSigningFields{
ProtocolVersion: "v1", ProtocolVersion: "v1",
DeviceSessionID: "device-session-123", DeviceSessionID: "device-session-123",
MessageType: "user.games.command", MessageType: "user.games.order",
TimestampMS: 123456789, TimestampMS: 123456789,
RequestID: "request-123", RequestID: "request-123",
PayloadHash: sha256Sum([]byte("payload")), PayloadHash: sha256Sum([]byte("payload")),
@@ -1,13 +1,13 @@
{ {
"message_type": "user.games.command", "message_type": "user.games.order",
"protocol_version": "v1", "protocol_version": "v1",
"device_session_id": "device-session-1", "device_session_id": "device-session-1",
"timestamp_ms": 1700000001000, "timestamp_ms": 1700000001000,
"request_id": "req-games-1", "request_id": "req-games-1",
"payload": "games-payload", "payload": "games-payload",
"payload_hash_hex": "a8322c99bf424939cd3a1e5a41b5edb67e567bff87c49e8ff229be60976960e0", "payload_hash_hex": "a8322c99bf424939cd3a1e5a41b5edb67e567bff87c49e8ff229be60976960e0",
"expected_canonical_bytes_hex": "1167616c6178792d726571756573742d7631027631106465766963652d73657373696f6e2d3112757365722e67616d65732e636f6d6d616e640000018bcfe56be80b7265712d67616d65732d3120a8322c99bf424939cd3a1e5a41b5edb67e567bff87c49e8ff229be60976960e0", "expected_canonical_bytes_hex": "1167616c6178792d726571756573742d7631027631106465766963652d73657373696f6e2d3110757365722e67616d65732e6f726465720000018bcfe56be80b7265712d67616d65732d3120a8322c99bf424939cd3a1e5a41b5edb67e567bff87c49e8ff229be60976960e0",
"private_key_seed_hex": "0303030303030303030303030303030303030303030303030303030303030303", "private_key_seed_hex": "0303030303030303030303030303030303030303030303030303030303030303",
"public_key_base64": "7UkoxijRwsbq6QM4kFmVYSlZJzpcY/k2NsFGFKyHN9E=", "public_key_base64": "7UkoxijRwsbq6QM4kFmVYSlZJzpcY/k2NsFGFKyHN9E=",
"expected_signature_hex": "262d5480451560d9b2ca96468b0e962e4288eabb4dff29dbc66c491a37dd92b779d2b89853083a695317f8535e49c402dcfd49a11fd2926f3af42ceb745e2b0a" "expected_signature_hex": "b4a9a1eb2eb67777469d87ed7c513afd89f0c0a96ca9e0d945cd327830c11a7834ac073f6a872d8121cd7674b9491399a0256210292615bd424d11d0db37200c"
} }
@@ -79,7 +79,7 @@ beforeAll(async () => {
describe("WasmCore canon parity with gateway fixtures", () => { describe("WasmCore canon parity with gateway fixtures", () => {
test.each([ test.each([
"request_user_account_get.json", "request_user_account_get.json",
"request_user_games_command.json", "request_user_games_order.json",
"request_lobby_my_games_list.json", "request_lobby_my_games_list.json",
])("%s — canonical bytes byte-for-byte equal", (name) => { ])("%s — canonical bytes byte-for-byte equal", (name) => {
const fixture = readJson<RequestFixture>(name); const fixture = readJson<RequestFixture>(name);