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 malicious url test more robust to env differences #3748

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

adamsachs
Copy link
Contributor

@adamsachs adamsachs commented Jul 7, 2023

Closes #3736

Description Of Changes

Mock the admin UI response for our test case to get a more predictable value.

It's not ideal, since there's a slight chance this could lead to false positives in the test case if we adjust our code around this area, so we'll just need to be a bit careful there. But I think it's a good enough test for now - and certainly better than getting false negatives all the time!

Code Changes

  • Mock the get_admin_index_as_response function for our test_malicious_url test case to get a more predictable value to evaluate in the test

Steps to Confirm

  • just need to make sure CI passes really

Pre-Merge Checklist

@adamsachs adamsachs self-assigned this Jul 7, 2023
@adamsachs adamsachs marked this pull request as ready for review July 7, 2023 16:28
@cypress
Copy link

cypress bot commented Jul 7, 2023

Passing run #3083 ↗︎

0 4 0 0 Flakiness 0

Details:

Merge 6e8a11d into bf0efa2...
Project: fides Commit: 4d48f61dca ℹ️
Status: Passed Duration: 00:46 💡
Started: Jul 7, 2023 4:42 PM Ended: Jul 7, 2023 4:43 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

Copy link
Contributor

@SteveDMurphy SteveDMurphy left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this @adamsachs ! The check failures are a surprise, mypy passes locally for me and the rest look like codecov upload problems. Not sure if we wanted to retry or what

@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Patch coverage has no change and project coverage change: +21.92 🎉

Comparison is base (bf0efa2) 65.20% compared to head (6e8a11d) 87.12%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3748       +/-   ##
===========================================
+ Coverage   65.20%   87.12%   +21.92%     
===========================================
  Files         311      311               
  Lines       19069    19069               
  Branches     2462     2462               
===========================================
+ Hits        12434    16614     +4180     
+ Misses       6197     2027     -4170     
+ Partials      438      428       -10     

see 147 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@adamsachs
Copy link
Contributor Author

Thanks for tackling this @adamsachs ! The check failures are a surprise, mypy passes locally for me and the rest look like codecov upload problems. Not sure if we wanted to retry or what

thanks @SteveDMurphy, the mypy issue is this other fun issue that we're already working on, nothing caused by this PR 👍

@adamsachs adamsachs merged commit 962905f into main Jul 7, 2023
37 of 38 checks passed
@adamsachs adamsachs deleted the asachs/fides-3736 branch July 7, 2023 21:23
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.

Resolve failing tests on main
2 participants