Skip to content

Commit

Permalink
Adds copy of game server to TestSDKServerReserveTimeout patch reactor
Browse files Browse the repository at this point in the history
  • Loading branch information
igooch committed Apr 29, 2024
1 parent cb4ed30 commit aeabdfd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/sdkserver/sdkserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1031,15 +1031,16 @@ func TestSDKServerReserveTimeout(t *testing.T) {
patchJSON := pa.GetPatch()
patch, err := jsonpatch.DecodePatch(patchJSON)
assert.NoError(t, err)
gsJSON, err := json.Marshal(gs)
gsCopy := gs.DeepCopy()
gsJSON, err := json.Marshal(gsCopy)
assert.NoError(t, err)
patchedGs, err := patch.Apply(gsJSON)
assert.NoError(t, err)
err = json.Unmarshal(patchedGs, &gs)
err = json.Unmarshal(patchedGs, &gsCopy)
assert.NoError(t, err)

state <- gs.Status
return true, &gs, nil
state <- gsCopy.Status
return true, gsCopy, nil
})

sc, err := defaultSidecar(m)
Expand Down

0 comments on commit aeabdfd

Please sign in to comment.