Skip to content

Commit 23bd61a

Browse files
Use --develop flag for agent install e2e tests (#4403)
* Use --develop flag for agent install e2e tests * Update testing stack version to 9.1.0-SNAPSHOT
1 parent 4c395d0 commit 23bd61a

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

dev-tools/e2e/kibana.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ xpack.fleet.agentPolicies:
5454
namespace: default
5555
package_policies:
5656
- name: fleet_server-2
57-
id: default-fleet-server
57+
id: apm-fleet-server
5858
package:
5959
name: fleet_server
6060
xpack.fleet.outputs:

dev-tools/integration/.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# If you use change this version without a pinned one, please update
22
# .ci/bump-elastic-stack-snapshot.yml or .github/workflows/bump-golang.yml
3-
ELASTICSEARCH_VERSION=9.0.0-a38910c2-SNAPSHOT
3+
ELASTICSEARCH_VERSION=9.1.0-ae17f1a1-SNAPSHOT
44
ELASTICSEARCH_USERNAME=elastic
55
ELASTICSEARCH_PASSWORD=changeme
66
TEST_ELASTICSEARCH_HOSTS=localhost:9200

testing/e2e/agent_install_test.go

+7-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (suite *AgentInstallSuite) SetupSuite() {
6767
return
6868
}
6969
// check if agent is installed
70-
if _, err := exec.LookPath(agentName); err == nil {
70+
if _, err := exec.LookPath(agentDevName); err == nil {
7171
suite.installDetected = true
7272
return // don't bother with setup, skip all tests
7373
}
@@ -277,15 +277,16 @@ func (suite *AgentInstallSuite) TearDownTest() {
277277
return
278278
}
279279

280-
out, err := exec.Command("sudo", "elastic-agent", "uninstall", "--force").CombinedOutput()
281-
suite.Assert().NoErrorf(err, "elastic-agent uninstall failed. Output: %s", out)
280+
out, err := exec.Command("sudo", "elastic-development-agent", "uninstall", "--force").CombinedOutput()
281+
suite.Assert().NoErrorf(err, "elastic-development-agent uninstall failed. Output: %s", out)
282282
}
283283

284284
func (suite *AgentInstallSuite) TestHTTP() {
285285
ctx, cancel := context.WithTimeout(context.Background(), time.Minute*3)
286286
defer cancel()
287287

288288
cmd := exec.CommandContext(ctx, "sudo", suite.agentPath, "install",
289+
"--develop", "--install-servers",
289290
"--fleet-server-es=http://"+suite.ESHosts,
290291
"--fleet-server-service-token="+suite.ServiceToken,
291292
"--fleet-server-insecure-http=true",
@@ -310,6 +311,7 @@ func (suite *AgentInstallSuite) TestWithSecretFiles() {
310311
defer cancel()
311312

312313
cmd := exec.CommandContext(ctx, "sudo", suite.agentPath, "install",
314+
"--develop", "--install-servers",
313315
"--url=https://localhost:8220",
314316
"--certificate-authorities="+filepath.Join(suite.CertPath, "e2e-test-ca.crt"),
315317
"--fleet-server-es=http://"+suite.ESHosts,
@@ -365,6 +367,7 @@ func (suite *AgentInstallSuite) TestAPMInstrumentationFile() {
365367
defer cancel()
366368

367369
cmd := exec.CommandContext(ctx, "sudo", suite.agentPath, "install",
370+
"--develop", "--install-servers",
368371
"--fleet-server-es=http://"+suite.ESHosts,
369372
"--fleet-server-service-token="+suite.ServiceToken,
370373
"--fleet-server-insecure-http=true",
@@ -403,6 +406,7 @@ func (suite *AgentInstallSuite) TestAPMInstrumentationPolicy() {
403406
})
404407

405408
cmd := exec.CommandContext(ctx, "sudo", suite.agentPath, "install",
409+
"--develop", "--install-servers",
406410
"--fleet-server-es=http://"+suite.ESHosts,
407411
"--fleet-server-service-token="+suite.ServiceToken,
408412
"--fleet-server-insecure-http=true",

testing/e2e/const.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44

55
package e2e
66

7-
const binaryName = "fleet-server" //nolint:unused // work around to get platform specific binary name for tests
8-
const agentName = "elastic-agent" //nolint:unused // work around to get platform specific binary name for tests
7+
const binaryName = "fleet-server" //nolint:unused // work around to get platform specific binary name for tests
8+
const agentName = "elastic-agent" //nolint:unused // work around to get platform specific binary name for tests
9+
const agentDevName = "elastic-development-agent" //nolint:unused // work around to get platform specific binary name for tests

testing/e2e/const_windows.go

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ package e2e
66

77
const binaryName = "fleet-server.exe"
88
const agentName = "elastic-agent.exe"
9+
const agentDevName = "elastic-development-agent.exe"

0 commit comments

Comments
 (0)