diff --git a/internal/pkg/api/openapi.gen.go b/internal/pkg/api/openapi.gen.go index 825e1954c..e4dd4a80e 100644 --- a/internal/pkg/api/openapi.gen.go +++ b/internal/pkg/api/openapi.gen.go @@ -402,7 +402,8 @@ type EnrollRequest struct { // Id The ID of the agent. // This is the ID that will be used to reference this agent, if no ID is passed one will be generated. // If another agent is enrolled with the same ID the other agent will no longer be able to communicate, - // this new agent is considered a replacement of the other agent. + // this new agent is considered a replacement of the other agent. The other agent will be able to continue + // sending data to ES. Id *string `json:"id,omitempty"` // Metadata Metadata associated with the agent that is enrolling to fleet. diff --git a/internal/pkg/server/fleet_integration_test.go b/internal/pkg/server/fleet_integration_test.go index f79b522dc..573c9ee63 100644 --- a/internal/pkg/server/fleet_integration_test.go +++ b/internal/pkg/server/fleet_integration_test.go @@ -875,6 +875,7 @@ func Test_Agent_Id_No_ReplaceToken(t *testing.T) { cli := cleanhttp.DefaultClient() res, err := cli.Do(req) require.NoError(t, err) + _ = res.Body.Close() require.Equal(t, http.StatusForbidden, res.StatusCode) } @@ -928,6 +929,7 @@ func Test_Agent_Id_ReplaceToken_Mismatch(t *testing.T) { cli := cleanhttp.DefaultClient() res, err := cli.Do(req) require.NoError(t, err) + _ = res.Body.Close() require.Equal(t, http.StatusForbidden, res.StatusCode) } diff --git a/model/openapi.yml b/model/openapi.yml index 9256959cc..e6a382db9 100644 --- a/model/openapi.yml +++ b/model/openapi.yml @@ -145,7 +145,8 @@ components: The ID of the agent. This is the ID that will be used to reference this agent, if no ID is passed one will be generated. If another agent is enrolled with the same ID the other agent will no longer be able to communicate, - this new agent is considered a replacement of the other agent. + this new agent is considered a replacement of the other agent. The other agent will be able to continue + sending data to ES. type: description: | The enrollment type of the agent. diff --git a/pkg/api/types.gen.go b/pkg/api/types.gen.go index 8eb68cc16..1bcaa4860 100644 --- a/pkg/api/types.gen.go +++ b/pkg/api/types.gen.go @@ -399,7 +399,8 @@ type EnrollRequest struct { // Id The ID of the agent. // This is the ID that will be used to reference this agent, if no ID is passed one will be generated. // If another agent is enrolled with the same ID the other agent will no longer be able to communicate, - // this new agent is considered a replacement of the other agent. + // this new agent is considered a replacement of the other agent. The other agent will be able to continue + // sending data to ES. Id *string `json:"id,omitempty"` // Metadata Metadata associated with the agent that is enrolling to fleet.