Skip to content

Commit

Permalink
fix test was using ServerAPIClaimUpdateResponse which is not yet part…
Browse files Browse the repository at this point in the history
… of the 2.10.x (#5561)
  • Loading branch information
derekcollison committed Jun 18, 2024
2 parents 64c3157 + 657c558 commit c8090e7
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions server/auth_callout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1986,9 +1986,17 @@ func updateAccount(t *testing.T, sys *nats.Conn, jwtToken string) {
r, err := sys.Request(fmt.Sprintf(`$SYS.REQ.ACCOUNT.%s.CLAIMS.UPDATE`, ac.Subject), []byte(jwtToken), time.Second*2)
require_NoError(t, err)

var updateResult ServerAPIClaimUpdateResponse
err = json.Unmarshal(r.Data, &updateResult)
type data struct {
Account string `json:"account"`
Code int `json:"code"`
}
type serverResponse struct {
Data data `json:"data"`
}

var response serverResponse
err = json.Unmarshal(r.Data, &response)
require_NoError(t, err)
require_NotNil(t, updateResult.Data)
require_Equal(t, updateResult.Data.Code, int(200))
require_NotNil(t, response.Data)
require_Equal(t, response.Data.Code, int(200))
}

0 comments on commit c8090e7

Please sign in to comment.