mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Fix host identity test (#31184)
Attempt to fix https://github.com/fleetdm/fleet/actions/runs/16474702385/job/46573038570?pr=31109#step:14:841. (I cannot reproduce locally.)
This commit is contained in:
parent
7a1e469ac0
commit
aba4ed08c8
1 changed files with 4 additions and 1 deletions
|
|
@ -244,6 +244,8 @@ func testOrbitEnrollment(t *testing.T, s *Suite, cert *x509.Certificate, eccPriv
|
|||
err = signer.Sign(req)
|
||||
require.NoError(t, err)
|
||||
|
||||
clonedRequest := req.Clone(ctx)
|
||||
|
||||
// Send the signed request
|
||||
client := fleethttp.NewClient()
|
||||
httpResp, err := client.Do(req)
|
||||
|
|
@ -261,10 +263,11 @@ func testOrbitEnrollment(t *testing.T, s *Suite, cert *x509.Certificate, eccPriv
|
|||
require.NoError(t, signedEnrollResp.Err)
|
||||
|
||||
// Send the same request again. We don't have replay protection, so it should succeed.
|
||||
httpResp, err = client.Do(req)
|
||||
httpResp, err = client.Do(clonedRequest)
|
||||
require.NoError(t, err)
|
||||
defer httpResp.Body.Close()
|
||||
require.Equal(t, http.StatusOK, httpResp.StatusCode, "Same request with HTTP signature should succeed")
|
||||
|
||||
// Parse the response
|
||||
signedEnrollResp = enrollOrbitResponse{}
|
||||
err = json.NewDecoder(httpResp.Body).Decode(&signedEnrollResp)
|
||||
|
|
|
|||
Loading…
Reference in a new issue