-
Notifications
You must be signed in to change notification settings - Fork 10
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
Run django db migrations for tests #729
base: main
Are you sure you want to change the base?
Conversation
This was originally bootstrapping separately with Django and SQLAlchemy creating separate databases. This ensures that Django bootstraps the test database with (more canonical) Django models. SQLAlchemy will reuse the database that Django bootstraps for testing purposes.
There are quite a few tables that are not moved to `shared` yet. So for the sake of getting tests to work, I'm bootstrapping them with the SQLAlchemy models.
This is getting this more similar to how the models are defined in Django
This is because the tests were failing on duplicate keys. Fixtures reuses existing objects, which avoids creating objects with duplicate keys.
This was failing on null values. Using the factory will fill in the fields that are required.
This helps reduce database key conflicts by reusing existing objects for tests
This is because the actual DB value is timezone aware.
❌ 30 Tests Failed:
View the top 3 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
❌ 30 Tests Failed:
View the top 3 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
❌ 30 Tests Failed:
View the top 3 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time. ❌ Failed Test Results:Completed 1695 tests with View the full list of failed testspytest
|
* null constraints on installation_ids * default yaml for owners created after a certain date
The owner.createstamp is now defaulting to now, which breaks all the tests that assumes that we are before the patch centric YAML selection. Now force the createstamp of the owner
This ensures that the table that the models run on are the Django models, rather than the slightly less accurate SQLAlchemy models.
Some of the fixes:
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.