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

feature file to support tests on 'install' subcommand #334

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions e2e/_suites/ingest-manager/features/agent_subcommands.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
@agent_subcommnds
Feature: Agent subcommands testing
Scenarios for the Agent to test the various subcommnds connecting it to Fleet.

@install
Scenario Outline: Deploying the <os> agent with install command
Given a "<os>" agent is deployed to Fleet with install command
Then the agent is listed in Fleet as "online"
And the "filebeat" process is in the "started" state on the host
And the "metricbeat" process is in the "started" state on the host
And system package dashboards are listed in Fleet
Examples:
| os |
| centos |
| debian |

@stop-installed-agent
Scenario Outline: Stopping an 'installed' <os> agent stops backend processes
Given a "<os>" agent is deployed to Fleet with install command
When the "elastic-agent" process is "stopped" on the host
Then the "filebeat" process is in the "stopped" state on the host
And the "metricbeat" process is in the "stopped" state on the host
Examples:
| os |
| centos |
| debian |

@restart-installed-host
Scenario Outline: Restarting the installed <os> host restarts backend processes
Given a "<os>" agent is deployed to Fleet with install command
When the host is restarted
Then the "elastic-agent" process is in the "started" state on the host
And the "filebeat" process is in the "started" state on the host
And the "metricbeat" process is in the "started" state on the host
Examples:
| os |
| centos |
| debian |

@unenroll-installed-host
Scenario Outline: Un-enrolling the installed <os> agent
Given a "<os>" agent is deployed to Fleet with install command
When the agent is un-enrolled
Then the "elastic-agent" process is in the "started" state on the host
And the agent is listed in Fleet as "inactive"
And the "filebeat" process is in the "stopped" state on the host
And the "metricbeat" process is in the "stopped" state on the host
Examples:
| os |
| centos |
| debian |

@reenroll-installed-host
Scenario Outline: Re-enrolling the installed <os> agent
Given a "<os>" agent is deployed to Fleet with install command
And the agent is un-enrolled
And the "elastic-agent" process is "stopped" on the host
When the agent is re-enrolled on the host
And the "elastic-agent" process is "started" on the host
Then the agent is listed in Fleet as "online"
Examples:
| os |
| centos |
| debian |

@uninstall-installed-host
Scenario Outline: Un-installing the installed <os> agent
Given a "<os>" agent is deployed to Fleet with install command
When the agent is "uninstalled" on the host
Then the "elastic-agent" process is in the "stopped" state on the host
And the agent is listed in Fleet as "inactive"
And the "filebeat" process is in the "stopped" state on the host
And the "metricbeat" process is in the "stopped" state on the host
And the file system Agent folder is empty
(Agent may end up deleted, if so we change this to 'Elastic folder does not have an Agent subfolder'

@restart-installed-host
Scenario Outline: Restarting the installed <os> agent
Given a "<os>" agent is deployed to Fleet with install command
When the agent is "restarted" on the host
And the agent is listed in Fleet as "online"
And the "filebeat" process is in the "started" state on the host
And the "metricbeat" process is in the "started" state on the host