Skip to content

Commit

Permalink
Moved estools to elastic-agent-libs (#6518)
Browse files Browse the repository at this point in the history
* moved estools to elastic-agent-libs

* remove elasticsearch/estools

* fix ID

* fix otel test ID
  • Loading branch information
khushijain21 authored Jan 13, 2025
1 parent c766ddd commit 268ac53
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 724 deletions.
715 changes: 0 additions & 715 deletions pkg/testing/tools/estools/elasticsearch.go

This file was deleted.

2 changes: 1 addition & 1 deletion testing/integration/agent_long_running_leak_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ import (

"github.com/elastic/elastic-agent-libs/api/npipe"
"github.com/elastic/elastic-agent-libs/kibana"
"github.com/elastic/elastic-agent-libs/testing/estools"
"github.com/elastic/elastic-agent/internal/pkg/agent/application/paths"
"github.com/elastic/elastic-agent/pkg/control/v2/cproto"
atesting "github.com/elastic/elastic-agent/pkg/testing"
"github.com/elastic/elastic-agent/pkg/testing/define"
"github.com/elastic/elastic-agent/pkg/testing/tools"
"github.com/elastic/elastic-agent/pkg/testing/tools/estools"
"github.com/elastic/elastic-agent/pkg/utils"
"github.com/elastic/go-sysinfo"
"github.com/elastic/go-sysinfo/types"
Expand Down
4 changes: 2 additions & 2 deletions testing/integration/beats_serverless_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"github.com/stretchr/testify/suite"

"github.com/elastic/elastic-agent-libs/mapstr"
"github.com/elastic/elastic-agent-libs/testing/estools"
atesting "github.com/elastic/elastic-agent/pkg/testing"
"github.com/elastic/elastic-agent/pkg/testing/define"
"github.com/elastic/elastic-agent/pkg/testing/tools"
"github.com/elastic/elastic-agent/pkg/testing/tools/estools"
)

type BeatRunner struct {
Expand Down Expand Up @@ -176,7 +176,7 @@ auditbeat.modules:
additionalCfg = packetbeatCfg
}

tmpl_map := map[string]string{"es_host": fixedESHost, "key_user": apiResp.Id, "key_pass": apiResp.APIKey, "kb_host": fixedKibanaHost, "test_id": testUuid.String(), "beat_cfg": additionalCfg}
tmpl_map := map[string]string{"es_host": fixedESHost, "key_user": apiResp.ID, "key_pass": apiResp.APIKey, "kb_host": fixedKibanaHost, "test_id": testUuid.String(), "beat_cfg": additionalCfg}
parsedCfg := bytes.Buffer{}
err = tmpl.Execute(&parsedCfg, tmpl_map)
require.NoError(runner.T(), err)
Expand Down
2 changes: 1 addition & 1 deletion testing/integration/fleetserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"github.com/stretchr/testify/require"

"github.com/elastic/elastic-agent-libs/kibana"
"github.com/elastic/elastic-agent-libs/testing/estools"
atesting "github.com/elastic/elastic-agent/pkg/testing"
"github.com/elastic/elastic-agent/pkg/testing/define"
"github.com/elastic/elastic-agent/pkg/testing/tools"
"github.com/elastic/elastic-agent/pkg/testing/tools/estools"
"github.com/elastic/elastic-agent/pkg/testing/tools/testcontext"
)

Expand Down
2 changes: 1 addition & 1 deletion testing/integration/logs_ingestion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import (
"github.com/hectane/go-acl"

"github.com/elastic/elastic-agent-libs/kibana"
"github.com/elastic/elastic-agent-libs/testing/estools"
"github.com/elastic/elastic-agent/pkg/control/v2/client"
"github.com/elastic/elastic-agent/pkg/control/v2/cproto"
atesting "github.com/elastic/elastic-agent/pkg/testing"
"github.com/elastic/elastic-agent/pkg/testing/define"
"github.com/elastic/elastic-agent/pkg/testing/tools"
"github.com/elastic/elastic-agent/pkg/testing/tools/check"
"github.com/elastic/elastic-agent/pkg/testing/tools/estools"
"github.com/elastic/elastic-agent/pkg/testing/tools/fleettools"
"github.com/elastic/elastic-agent/pkg/testing/tools/testcontext"
"github.com/elastic/elastic-agent/testing/installtest"
Expand Down
2 changes: 1 addition & 1 deletion testing/integration/metrics_monitoring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"github.com/stretchr/testify/suite"

"github.com/elastic/elastic-agent-libs/kibana"
"github.com/elastic/elastic-agent-libs/testing/estools"
atesting "github.com/elastic/elastic-agent/pkg/testing"
"github.com/elastic/elastic-agent/pkg/testing/define"
"github.com/elastic/elastic-agent/pkg/testing/tools"
"github.com/elastic/elastic-agent/pkg/testing/tools/estools"
)

type MetricsRunner struct {
Expand Down
2 changes: 1 addition & 1 deletion testing/integration/monitoring_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"github.com/stretchr/testify/suite"

"github.com/elastic/elastic-agent-libs/kibana"
"github.com/elastic/elastic-agent-libs/testing/estools"
atesting "github.com/elastic/elastic-agent/pkg/testing"
"github.com/elastic/elastic-agent/pkg/testing/define"
"github.com/elastic/elastic-agent/pkg/testing/tools"
"github.com/elastic/elastic-agent/pkg/testing/tools/estools"
"github.com/elastic/elastic-agent/pkg/testing/tools/testcontext"
)

Expand Down
4 changes: 2 additions & 2 deletions testing/integration/otel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/elastic/elastic-agent-libs/testing/estools"
"github.com/elastic/elastic-agent/pkg/control/v2/client"
aTesting "github.com/elastic/elastic-agent/pkg/testing"
"github.com/elastic/elastic-agent/pkg/testing/define"
"github.com/elastic/elastic-agent/pkg/testing/tools/estools"
"github.com/elastic/elastic-agent/pkg/testing/tools/testcontext"
"github.com/elastic/go-elasticsearch/v8"
)
Expand Down Expand Up @@ -573,7 +573,7 @@ func TestOtelAPMIngestion(t *testing.T) {
"run",
"-e",
"-E", "output.elasticsearch.hosts=['" + esHost + "']",
"-E", "output.elasticsearch.api_key=" + fmt.Sprintf("%s:%s", esApiKey.Id, esApiKey.APIKey),
"-E", "output.elasticsearch.api_key=" + fmt.Sprintf("%s:%s", esApiKey.ID, esApiKey.APIKey),
"-E", "apm-server.host=127.0.0.1:8200",
"-E", "apm-server.ssl.enabled=false",
}
Expand Down

0 comments on commit 268ac53

Please sign in to comment.