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

Storage test infra refactor #24351

Merged
merged 12 commits into from
Oct 5, 2021

Conversation

jaschrep-msft
Copy link
Member

Pulls some basics of client tests out of XxxTestBase hierarchy and into separate utility classes so they can be accessed outside of said hierarchy. Useful for writing unified tests across multiple Storage services without excessive code duplication.

Key Changes:

  • TenantConfigurationBuilder houses code previously in StorageTestBase that grabs TenantConfigurations out of a config file.
  • ClientBuilder houses genericized code previously in BlobTestBase/DataLakeTestBase/etc. that creates XxxServiceClients out of results from TenantConfigurationBuilder.
  • Each service test suite has a ClientBuilderExtensions class that decorates the ClientBuilder with functionality that doesn't fit easy into generics.

Notes to reviewers:

  • This is not intended to be a comprehensive change covering all facets of test infra. It is a starting point that will lead towards better maintenance and immediately open some doors for current testing needs.
  • Currently, these separated classes are still dependent on some functionality provided by Azure Core's RecordedTestBase, and so we still have to pass in an instance of that. We need access to the Recording management and InstrumentClient. Not ideal but still a significant improvement.

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Sep 30, 2021
Copy link
Contributor

@kasobol-msft kasobol-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice, this is going into right direction.

@jaschrep-msft jaschrep-msft marked this pull request as ready for review October 5, 2021 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants