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

[2.0] Try out a mock builder #420

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

strawgate
Copy link
Collaborator

@strawgate strawgate commented Dec 21, 2024

Looking to simplify the common web request mocks and wanted to try out a builder pattern
es_mock_builder.as_elasticsearch_8_17().with_correct_permissions()

Will wait for feedback before going further with the implementation

@strawgate
Copy link
Collaborator Author

@legrego would love your thoughts on using a builder pattern for the es mock setups

Copy link
Contributor

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py00100% 
elasticsearch
   __init__.py1421390%29, 50–55, 74, 93, 98, 212, 240–241
   config_flow.py1590100% 
   const.py540100% 
   diagnostics.py80100% 
   encoder.py23291%42, 51
   entity_details.py1100100% 
   errors.py120100% 
   es_datastream_manager.py42197%81
   es_gateway.py1141586%16–18, 20–21, 90, 121–123, 125, 127, 138, 141, 144, 197
   es_gateway_8.py2256073%36–37, 54, 56–58, 60–61, 63–64, 66, 149, 169, 171, 173, 205, 237–238, 240, 245–246, 248, 264–268, 270, 273–276, 290–291, 308, 311–312, 314, 320–321, 325–326, 342–343, 346–347, 368–369, 375–377, 379–381, 383, 385–387, 389–390
   es_integration.py56885%39–40, 42–43, 96–97, 125–126
   es_publish_pipeline.py3893291%69, 227, 235, 262–263, 272–273, 277–280, 282–283, 285–288, 290–293, 295–298, 360–361, 368–369, 381, 402, 610
   logger.py620100% 
   loop.py520100% 
   system_info.py33584%34–37, 52
   utils.py100100% 
elasticsearch/datastreams
   __init__.py20100% 
   index_template.py20100% 
TOTAL149513690% 

Tests Skipped Failures Errors Time
255 0 💤 0 ❌ 0 🔥 17.749s ⏱️

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.

1 participant