Skip to content

Commit

Permalink
Uniquify the stand-alone step for checking agent status (elastic#993) (
Browse files Browse the repository at this point in the history
…elastic#996)

There were 2 steps identical in both the stand-alone and fleet test suites.
Running the stand-alone test suite was picking up the step from the fleet test
suite and trying to reference the FleetTestSuite structure which did not hold
any of the agent information (like the hostname) for the stand alone tests.

This fixes it so that the standalone test step is being referenced in the
correct test suite.

Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
(cherry picked from commit d9e3b51)

Co-authored-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
  • Loading branch information
mergify[bot] and adam-stokes authored Apr 7, 2021
1 parent 535edcd commit 9818d67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e/_suites/fleet/features/stand_alone_agent.feature
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Examples: Ubi8
@run_fleet_server
Scenario Outline: Deploying a <image> stand-alone agent with fleet server mode
When a "<image>" stand-alone agent is deployed with fleet server mode
Then the agent is listed in Fleet as "online"
Then the stand-alone agent is listed in Fleet as "online"

@default
Examples: default
Expand Down
2 changes: 1 addition & 1 deletion e2e/_suites/fleet/stand-alone.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (sats *StandAloneTestSuite) contributeSteps(s *godog.ScenarioContext) {
s.Step(`^there is new data in the index from agent$`, sats.thereIsNewDataInTheIndexFromAgent)
s.Step(`^the "([^"]*)" docker container is stopped$`, sats.theDockerContainerIsStopped)
s.Step(`^there is no new data in the index after agent shuts down$`, sats.thereIsNoNewDataInTheIndexAfterAgentShutsDown)
s.Step(`^the agent is listed in Fleet as "([^"]*)"$`, sats.theAgentIsListedInFleetWithStatus)
s.Step(`^the stand-alone agent is listed in Fleet as "([^"]*)"$`, sats.theAgentIsListedInFleetWithStatus)
}

func (sats *StandAloneTestSuite) theAgentIsListedInFleetWithStatus(desiredStatus string) error {
Expand Down

0 comments on commit 9818d67

Please sign in to comment.