From 973953ec4a6c6001b2079c641c23dec11379afff Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Wed, 2 Dec 2020 10:59:50 -0500 Subject: [PATCH] work for issue #379 - adding back rpm and deb tests (#439) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * adding back rpm and deb tests * arbitrary change to trigger ci tests * fix linting * fixing more linting * fully exploring gherkin linting apparently * final linting fix * updating ci suites to match new tags * reset indention w feedback passes linting locally * adding skip support and skipping rpm and deb tests * back to fixing linting for tags now Co-authored-by: Manuel de la Peña --- .ci/.e2e-tests.yaml | 6 +- .../fleet/features/fleet_mode_agent.feature | 91 +++++++++++-------- .../fleet/features/stand_alone_agent.feature | 2 +- 3 files changed, 56 insertions(+), 43 deletions(-) diff --git a/.ci/.e2e-tests.yaml b/.ci/.e2e-tests.yaml index f0f15b2f8d..61bcf729b4 100644 --- a/.ci/.e2e-tests.yaml +++ b/.ci/.e2e-tests.yaml @@ -7,11 +7,11 @@ SUITES: - suite: "helm" tags: "metricbeat" - suite: "fleet" - tags: "agent_endpoint_integration" + tags: "agent_endpoint_integration && ~skip" - suite: "fleet" - tags: "stand_alone_mode" + tags: "stand_alone_agent && ~skip" - suite: "fleet" - tags: "fleet_mode" + tags: "fleet_mode_agent && ~skip" - suite: "metricbeat" tags: "integrations && apache" - suite: "metricbeat" diff --git a/e2e/_suites/fleet/features/fleet_mode_agent.feature b/e2e/_suites/fleet/features/fleet_mode_agent.feature index 1c765373a6..1e94f843f1 100644 --- a/e2e/_suites/fleet/features/fleet_mode_agent.feature +++ b/e2e/_suites/fleet/features/fleet_mode_agent.feature @@ -1,94 +1,107 @@ -@fleet_mode +@fleet_mode_agent Feature: Fleet Mode Agent Scenarios for the Agent in Fleet mode connecting to Fleet application. -@enroll +@install Scenario Outline: Deploying the agent - When a "" agent is deployed to Fleet with "" installer - 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 + Given a "" agent is deployed to Fleet with "tar" installer + When the "elastic-agent" process is in the "started" state on the host + Then the "filebeat" process is in the "started" state on the host And the "metricbeat" process is in the "started" state on the host And the agent is listed in Fleet as "online" And system package dashboards are listed in Fleet Examples: -| os | installer | -| centos | tar | -| debian | tar | +| os | +| centos | +| debian | + +@skip // reset the following tag when unskipping: enroll +Scenario Outline: Deploying the agent with enroll and then run on rpm and deb + Given a "" agent is deployed to Fleet with "systemd" installer + When the "elastic-agent" process is in the "started" state on the host + Then the "filebeat" process is in the "started" state on the host + And the "metricbeat" process is in the "started" state on the host + And the agent is listed in Fleet as "online" + And system package dashboards are listed in Fleet +Examples: +| os | +| centos | +| debian | @stop-agent Scenario Outline: Stopping the agent stops backend processes - Given a "" agent is deployed to Fleet with "" installer + Given a "" agent is deployed to Fleet with "tar" installer 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 | installer | -| centos | tar | -| debian | tar | +| os | +| centos | +| debian | @restart-agent Scenario Outline: Restarting the installed agent - Given a "" agent is deployed to Fleet with "" installer + Given a "" agent is deployed to Fleet with "tar" installer When the "elastic-agent" process is "restarted" on the host - And the "filebeat" process is in the "started" state on the host + Then the "filebeat" process is in the "started" state on the host And the "metricbeat" process is in the "started" state on the host And the agent is listed in Fleet as "online" Examples: -| os | installer | -| centos | tar | -| debian | tar | +| os | +| centos | +| debian | @restart-host Scenario Outline: Restarting the host with persistent agent restarts backend processes - Given a "" agent is deployed to Fleet with "" installer + Given a "" agent is deployed to Fleet with "tar" installer 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 | installer | -| centos | tar | -| debian | tar | +| os | +| centos | +| debian | @unenroll Scenario Outline: Un-enrolling the agent - Given a "" agent is deployed to Fleet with "" installer + Given a "" agent is deployed to Fleet with "tar" installer 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 | installer | -| centos | tar | -| debian | tar | +| os | +| centos | +| debian | @reenroll Scenario Outline: Re-enrolling the agent - Given a "" agent is deployed to Fleet with "" installer + Given a "" agent is deployed to Fleet with "tar" installer 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" + Then the "elastic-agent" process is "started" on the host + And the agent is listed in Fleet as "online" Examples: -| os | installer | -| centos | tar | -| debian | tar | +| os | +| centos | +| debian | @revoke-token Scenario Outline: Revoking the enrollment token for the agent - Given a "" agent is deployed to Fleet with "" installer + Given a "" agent is deployed to Fleet with "tar" installer When the enrollment token is revoked Then an attempt to enroll a new agent fails Examples: -| os | installer | -| centos | tar | -| debian | tar | +| os | +| centos | +| debian | @uninstall-host Scenario Outline: Un-installing the installed agent - Given a "" agent is deployed to Fleet with "" installer + Given a "" agent is deployed to Fleet with "tar" installer When the "elastic-agent" process is "uninstalled" on the host Then the "elastic-agent" process is in the "stopped" state on the host And the "filebeat" process is in the "stopped" state on the host @@ -96,6 +109,6 @@ Scenario Outline: Un-installing the installed agent And the file system Agent folder is empty And the agent is listed in Fleet as "offline" Examples: -| os | installer | -| centos | tar | -| debian | tar | +| os | +| centos | +| debian | diff --git a/e2e/_suites/fleet/features/stand_alone_agent.feature b/e2e/_suites/fleet/features/stand_alone_agent.feature index 870a771db4..bdc78beeec 100644 --- a/e2e/_suites/fleet/features/stand_alone_agent.feature +++ b/e2e/_suites/fleet/features/stand_alone_agent.feature @@ -1,4 +1,4 @@ -@stand_alone_mode +@stand_alone_agent Feature: Stand-alone Agent Scenarios for a standalone mode Elastic Agent in Fleet, where an Elasticseach and a Kibana instances are already provisioned, so that the Agent is able to communicate