From 8cff411e9b3ef9c4a93c2e0943e7d2fe3bde41b1 Mon Sep 17 00:00:00 2001 From: "R.I.Pienaar" Date: Wed, 24 Jul 2024 15:23:17 +0300 Subject: [PATCH] Send the correct struct to the restore API 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 --- server/jetstream_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/jetstream_test.go b/server/jetstream_test.go index cfe85f92d53..8146182df67 100644 --- a/server/jetstream_test.go +++ b/server/jetstream_test.go @@ -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)