-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add user-agent spec + gherkin spec (#514)
* add user-agent spec + gherkin spec * update regex * make regex a bit more strict * wording fix specs/agents/transport.md Co-authored-by: Trent Mick <trentm@gmail.com> * align spec to es-client user-agent header Co-authored-by: Trent Mick <trentm@gmail.com>
- Loading branch information
1 parent
1831cc3
commit 9dd05a8
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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\)' |