From 2ee3040a4541bf9e8efba3a4a446ba4c3c3748c1 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Thu, 24 Sep 2020 15:26:26 -0400 Subject: [PATCH] first version of feature file --- .../features/agent_subcommands.feature | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 e2e/_suites/ingest-manager/features/agent_subcommands.feature diff --git a/e2e/_suites/ingest-manager/features/agent_subcommands.feature b/e2e/_suites/ingest-manager/features/agent_subcommands.feature new file mode 100644 index 0000000000..80fd5e40ed --- /dev/null +++ b/e2e/_suites/ingest-manager/features/agent_subcommands.feature @@ -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 agent with install command + Given a "" 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' agent stops backend processes + Given a "" 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 host restarts backend processes + Given a "" 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 agent + Given a "" 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 agent + Given a "" 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 agent + Given a "" 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 agent + Given a "" 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 +