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

fix tests for new heroku stack #516

Merged
merged 2 commits into from
Nov 1, 2024
Merged

fix tests for new heroku stack #516

merged 2 commits into from
Nov 1, 2024

Conversation

artoonie
Copy link
Owner

@artoonie artoonie commented Nov 1, 2024

Our previous Heroku infrastructure, the heroku-20 stack, is deprecated. I'm hoping to upgrade all of RCVis' infrastructure to a supported stack before the election, just in case. I thought this was completed in #513 and #514, but it looks like those upgraded our production stack but not our test infrastructure.

This PR makes all fixes necessary for Heroku CI to pass again on the new stack.

@artoonie artoonie force-pushed the fix-tests-for-new-stack branch 2 times, most recently from dd17bed to 5f80113 Compare November 1, 2024 20:02
electionpage/tests.py Fixed Show fixed Hide fixed
@artoonie artoonie force-pushed the fix-tests-for-new-stack branch 5 times, most recently from 055bee4 to 134d4c2 Compare November 1, 2024 21:25
electionpage/tests.py Fixed Show fixed Hide fixed
@artoonie artoonie force-pushed the fix-tests-for-new-stack branch 2 times, most recently from 5c946c9 to 2ae2ece Compare November 1, 2024 21:39
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.70%. Comparing base (4a9c37e) to head (d32feec).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #516   +/-   ##
=======================================
  Coverage   96.70%   96.70%           
=======================================
  Files         121      121           
  Lines        5827     5833    +6     
=======================================
+ Hits         5635     5641    +6     
  Misses        192      192           
Files with missing lines Coverage Δ
common/viewUtils.py 100.00% <100.00%> (ø)
electionpage/tests.py 100.00% <100.00%> (ø)
movie/creation/movieCreator.py 96.62% <100.00%> (ø)
movie/creation/textToSpeech.py 87.64% <100.00%> (ø)
movie/tests.py 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a9c37e...d32feec. Read the comment docs.

@artoonie artoonie force-pushed the fix-tests-for-new-stack branch 2 times, most recently from 02afb59 to d9551e1 Compare November 1, 2024 22:35
Copy link
Contributor

@code-review-doctor code-review-doctor bot left a comment

Choose a reason for hiding this comment

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

Some food for thought. View full project report here.

for scraper in ScrapableElectionPage.objects.get(slug='cuteslug').listOfScrapers.all():
# Wait for the object to be loaded
self._ensure_eventually_asserts(
lambda: ScrapableElectionPage.objects.filter(slug='cuteslug').exists()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
lambda: ScrapableElectionPage.objects.filter(slug='cuteslug').exists()
ScrapableElectionPage.objects.filter(slug='cuteslug').exists

Avoid unnecessarily wrapping ScrapableElectionPage.objects.filter.exists in a lambda. More info.

@artoonie artoonie force-pushed the fix-tests-for-new-stack branch from d9551e1 to b1438e5 Compare November 1, 2024 22:40
Copy link
Contributor

@code-review-doctor code-review-doctor bot left a comment

Choose a reason for hiding this comment

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

Some things to consider. View full project report here.

electionpage/tests.py Outdated Show resolved Hide resolved
Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>
@artoonie artoonie merged commit 23570b3 into main Nov 1, 2024
8 checks passed
@artoonie artoonie deleted the fix-tests-for-new-stack branch November 1, 2024 23:13
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