From 9a2bd7401f7afc70f11bdecb7e06423b9f95f88d Mon Sep 17 00:00:00 2001 From: apmmachine Date: Tue, 12 Oct 2021 14:23:23 +0000 Subject: [PATCH] test: synchronizing gherkin specs --- features/user_agent.feature | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 features/user_agent.feature diff --git a/features/user_agent.feature b/features/user_agent.feature new file mode 100644 index 000000000..411909c08 --- /dev/null +++ b/features/user_agent.feature @@ -0,0 +1,19 @@ +Feature: Agent Transport User agent Header + + Scenario: Default user-agent + Given an agent + When service name is not set + When service version is not set + Then the User-Agent header matches regex '^apm-agent-[a-z]+/[^ ]*' + + Scenario: User-agent with service name only + Given an agent + When service name is set to 'myService' + When service version is not set + Then the User-Agent header matches regex '^apm-agent-[a-z]+/[^ ]* \(myService\)' + + Scenario: User-agent with service name and service version + Given an agent + When service name is set to 'myService' + When service version is set to 'v42' + Then the User-Agent header matches regex '^apm-agent-[a-z]+/[^ ]* \(myService v42\)'