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

[CONSVC-2063] test: extract middleware unit tests #106

Merged
merged 9 commits into from
Nov 16, 2022
Merged

[CONSVC-2063] test: extract middleware unit tests #106

merged 9 commits into from
Nov 16, 2022

Conversation

Trinaa
Copy link
Contributor

@Trinaa Trinaa commented Nov 8, 2022

Description

  • rename suggest integration test files to test_suggest_top_picks.py and test_suggest_wiki_fruit.py
  • move test_user_agent.py to the util directory
  • refactor UserAgentMiddleware tests to unit level or move to test_suggest.py module
  • refactor FeatureFlagMiddleware tests to unit level and add unit coverage
  • create log_data_creators.py utility module to allow for unit level testing
  • refactor LoggingMiddleware tests to unit level or move to endpoint modules
  • refactor MetricsMiddleware integration tests to endpoint modules and add unit coverage
  • update unit test documentation to include middleware and log_data test fixtures

Issue(s)

#85 | CONSVC-2063

@Trinaa Trinaa changed the title WIP [CONSVC-2063] test: extract middleware unit tests [CONSVC-2063] test: extract middleware unit tests Nov 14, 2022
@Trinaa Trinaa marked this pull request as ready for review November 14, 2022 20:34
@Trinaa Trinaa requested a review from a team November 14, 2022 20:35
@ncloudioj
Copy link
Contributor

@Trinaa I just skimmed over the PR, and it looks good. I will take another closer look at it tomorrow :)

Copy link
Contributor

@ncloudioj ncloudioj left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@Trinaa Out of curiosity, why 1998-03-31?

Copy link
Member

@hackebrot hackebrot left a comment

Choose a reason for hiding this comment

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

Hi @Trinaa! 👋🏻

I've added a few suggestions for your consideration.

merino/middleware/featureflags.py Show resolved Hide resolved
merino/middleware/logging.py Outdated Show resolved Hide resolved
tests/integration/api/v1/suggest/test_suggest.py Outdated Show resolved Hide resolved
tests/unit/util/test_log_data_creator.py Outdated Show resolved Hide resolved
@Trinaa
Copy link
Contributor Author

Trinaa commented Nov 16, 2022

Looks great, thanks!

@Trinaa Out of curiosity, why 1998-03-31?

image

@Trinaa Trinaa merged commit 801305c into main Nov 16, 2022
@Trinaa Trinaa deleted the consvc-2063 branch November 16, 2022 18:28
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.

4 participants