Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Fix fleet server test#994

Closed
jalvz wants to merge 2 commits intoelastic:masterfrom
jalvz:fix-fleet-server-test
Closed

Fix fleet server test#994
jalvz wants to merge 2 commits intoelastic:masterfrom
jalvz:fix-fleet-server-test

Conversation

@jalvz
Copy link
Copy Markdown
Contributor

@jalvz jalvz commented Apr 6, 2021

What does this PR do?

Follow up of #978

Why is it important?

Because 978 is broken

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the Unit tests for the CLI, and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #994 opened

  • Start Time: 2021-04-06T15:35:01.856+0000

  • Duration: 24 min 25 sec

  • Commit: 826b9f0

Test stats 🧪

Test Results
Failed 0
Passed 138
Skipped 0
Total 138

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 138
Skipped 0
Total 138

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 agent is listed in the Fleet UI as "online"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will do the trick, although we'd like to read that this step belongs to the standalone agent in the spec. At least until we have a better abstraction for both existing steps (this one and the one for the managed mode) at the test suite struct level (maybe merging both structs into one instead of decoupling behaviours, at the end of the day, the end results should be the same: operate on an agent)?

Wdyt about this?

Suggested change
Then the agent is listed in the Fleet UI as "online"
Then the standalone agent is listed in Fleet as "online"

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 agent is listed in the Fleet UI as "([^"]*)"$`, sats.theAgentIsListedInFleetWithStatus)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consequently:

Suggested change
s.Step(`^the agent is listed in the Fleet UI as "([^"]*)"$`, sats.theAgentIsListedInFleetWithStatus)
s.Step(`^the standalone agent is listed in Fleet as "([^"]*)"$`, sats.theAgentIsListedInFleetWithStatus)

@mdelapenya
Copy link
Copy Markdown
Contributor

BTW, did not realise that #993 was merged, providing same implementation as I described in #994 (comment)

Will close this one for that reason, but please open a follow up PR/issue for any change you consider. Thanks!

@mdelapenya mdelapenya closed this Apr 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants