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

Make the storage and cdn implementations mockable #1

Open
jweyrich opened this issue Mar 10, 2022 · 0 comments
Open

Make the storage and cdn implementations mockable #1

jweyrich opened this issue Mar 10, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@jweyrich
Copy link
Owner

Define interfaces for implementations that support the dry-run flag so we can mock those implementations and no longer require the dry-run flag to be passed around. A dummy example to explain:

if dry_run:
  cdn_impl = MockCdnImpl()
  storage_impl = MockStorageImpl()
else:
  cdn_impl = ReadCdnImpl()
  storage_impl = RealStorageImpl()
  
cdn_impl.do_something()
storage_impl.do_something()
@jweyrich jweyrich added the enhancement New feature or request label Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant