From 3f266eb89902c7e1d1ef7f74e2cce96a0337a3ba Mon Sep 17 00:00:00 2001 From: apmmachine Date: Tue, 12 Oct 2021 14:23:25 +0000 Subject: [PATCH] test: synchronizing gherkin specs --- .../test/resources/specs/user_agent.feature | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 apm-agent-core/src/test/resources/specs/user_agent.feature diff --git a/apm-agent-core/src/test/resources/specs/user_agent.feature b/apm-agent-core/src/test/resources/specs/user_agent.feature new file mode 100644 index 0000000000..411909c085 --- /dev/null +++ b/apm-agent-core/src/test/resources/specs/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\)'