Skip to content

Commit

Permalink
Send the correct struct to the restore API
Browse files Browse the repository at this point in the history
While validating the ideas in ADR-44 the proposed improvements
caught the fact that a snapshot request was being sent to a restore
API call. Tests passed because there was enough overlap in the structs
but strictly should have been a failure due to the invalid request

Signed-off-by: R.I.Pienaar <rip@devco.net>
  • Loading branch information
ripienaar committed Jul 24, 2024
1 parent 571d97a commit 8cff411
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/jetstream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4258,6 +4258,7 @@ func TestJetStreamSnapshotsAPI(t *testing.T) {
state = mset.state()
mset.delete()

req, _ = json.Marshal(rreq)
rmsg, err = nc2.Request(strings.ReplaceAll(JSApiStreamRestoreT, JSApiPrefix, "$JS.domain.API"), req, time.Second)
if err != nil {
t.Fatalf("Unexpected error on snapshot request: %v", err)
Expand Down

0 comments on commit 8cff411

Please sign in to comment.