Skip to content

Commit

Permalink
Add missing error check when installing agent. (#3122)
Browse files Browse the repository at this point in the history
Fixes nil deference when policy response is nil.
  • Loading branch information
cmacknz authored Jul 25, 2023
1 parent 1be6088 commit 679c4ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions testing/integration/endpoint_security_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func TestInstallAndCLIUninstallWithEndpointSecurity(t *testing.T) {
},
}
policyResp, err := tools.InstallAgentWithPolicy(t, fixture, info.KibanaClient, createPolicyReq)
require.NoError(t, err)

t.Log("Installing Elastic Defend")
installElasticDefendPackage(t, info, policyResp.ID)
Expand Down Expand Up @@ -133,6 +134,7 @@ func TestInstallAndUnenrollWithEndpointSecurity(t *testing.T) {
},
}
policyResp, err := tools.InstallAgentWithPolicy(t, fixture, info.KibanaClient, createPolicyReq)
require.NoError(t, err)

t.Log("Installing Elastic Defend")
installElasticDefendPackage(t, info, policyResp.ID)
Expand Down

0 comments on commit 679c4ab

Please sign in to comment.