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

Add a MockAzureClient which can simulate azure failures #1331

Merged
merged 11 commits into from
Feb 16, 2024

Conversation

muhammadhamzasajjad
Copy link
Collaborator

This is similar to #1281.

  • Adds a config option to use the MockAzureClient instead of the RealAzureClient
  • If a MockAzureClient is created, one can simulate failures by passing the appropriate symbol name
  • Creates tests to ensure that MockAzureClient works properly for read, write, update, delete and list functions.

To do: Test exceptions thrown by MockAzureClient. This will be done in the next PR where we normalize Azure exception.

Checklist

Checklist for code changes...
  • Have you updated the relevant docstrings, documentation and copyright notice?
  • Is this contribution tested against all ArcticDB's features?
  • Do all exceptions introduced raise appropriate error messages?
  • Are API changes highlighted in the PR description?
  • Is the PR labelled as enhancement or bug so it appears in autogenerated release notes?

Copy link
Collaborator

@poodlewars poodlewars left a comment

Choose a reason for hiding this comment

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

Looks good! Please squash the commits in to one before merging

@muhammadhamzasajjad muhammadhamzasajjad merged commit 74b8192 into master Feb 16, 2024
110 checks passed
@muhammadhamzasajjad muhammadhamzasajjad deleted the azure_storage_mock_client branch February 16, 2024 11:22
muhammadhamzasajjad added a commit that referenced this pull request Mar 8, 2024
Similar to #1331. The mock client will then be used to test exception
normalization. Wrap up common things like `StorageOperation` and `StorageFailure` into `storage_mock_client.hpp`
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.

3 participants