Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port: [#4233] Add ApplicationName to CosmosDb client options for UserAgent (#6321) #4248

Merged
merged 3 commits into from
Jun 15, 2022

Conversation

ceciliaavila
Copy link
Collaborator

Fixes #4233

Description

This PR updates the cosmosDbPartitionedStorage class to set the package name and version in the UserAgent header for calls to CosmosDb.
It also adds a unit test to cover the changes made.

Specific Changes

  • Set the name and version from the package.json in the userAgentSuffix property of cosmosClientOptions.
  • Added a unit test that verifies the new value is correctly appended to the User-Agent header.
  • Updated the Nock recordings in tests/TestData/CosmosDbPartitionedStorage - Base Storage Tests as the container ids have been incremented by the new test.

Testing

This image shows the new test successfully executed.
image

@ceciliaavila ceciliaavila requested a review from a team as a code owner May 30, 2022 19:58
@coveralls
Copy link

coveralls commented May 30, 2022

Pull Request Test Coverage Report for Build 2411081048

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 84.481%

Totals Coverage Status
Change from base Build 2387271645: 0.5%
Covered Lines: 19903
Relevant Lines: 22311

💛 - Coveralls

@tracyboehrer tracyboehrer merged commit e339a30 into main Jun 15, 2022
@tracyboehrer tracyboehrer deleted the southworks/update/cosmosdb-client-options branch June 15, 2022 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

port: Add ApplicationName to CosmosDb client options for UserAgent (#6321)
3 participants