Skip to content

Commit

Permalink
Remove the agent config file parameters for stand alone (elastic#983)
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Stokes <[email protected]>

Co-authored-by: Manuel de la Peña <[email protected]>
  • Loading branch information
adam-stokes and mdelapenya committed Apr 22, 2021
1 parent 07f8fa6 commit ad8a45b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
2 changes: 0 additions & 2 deletions cli/config/compose/services/elastic-agent/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ services:
platform: ${elasticAgentPlatform:-linux/amd64}
ports:
- "127.0.0.1:8220:8220"
volumes:
- "${elasticAgentConfigFile}:/usr/share/elastic-agent/elastic-agent.yml"
23 changes: 3 additions & 20 deletions e2e/_suites/fleet/stand-alone.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"context"
"fmt"
"os"
"strings"
"time"

Expand All @@ -27,10 +26,9 @@ import (

// StandAloneTestSuite represents the scenarios for Stand-alone-mode
type StandAloneTestSuite struct {
AgentConfigFilePath string
Cleanup bool
Hostname string
Image string
Cleanup bool
Hostname string
Image string
// date controls for queries
AgentStoppedDate time.Time
RuntimeDependenciesStartDate time.Time
Expand All @@ -52,21 +50,6 @@ func (sats *StandAloneTestSuite) afterScenario() {
} else {
log.WithField("service", serviceName).Info("Because we are running in development mode, the service won't be stopped")
}

if _, err := os.Stat(sats.AgentConfigFilePath); err == nil {
beatsLocalPath := shell.GetEnv("BEATS_LOCAL_PATH", "")
if beatsLocalPath == "" {
os.Remove(sats.AgentConfigFilePath)

log.WithFields(log.Fields{
"path": sats.AgentConfigFilePath,
}).Trace("Elastic Agent configuration file removed.")
} else {
log.WithFields(log.Fields{
"path": sats.AgentConfigFilePath,
}).Trace("Elastic Agent configuration file not removed because it's part of a repository.")
}
}
}

func (sats *StandAloneTestSuite) contributeSteps(s *godog.ScenarioContext) {
Expand Down

0 comments on commit ad8a45b

Please sign in to comment.