diff options
author | Chris Meyers <chrismeyersfsu@users.noreply.github.com> | 2023-11-17 19:33:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-17 19:33:08 +0100 |
commit | 2ac304d2899f3f2b13c97b2ad30fcf91d8fe90ee (patch) | |
tree | e9210bc752d5cd4c3fadf57946dbdafa350c2f2e /.github/workflows/promote.yml | |
parent | Upgrade doc requirements (#14669) (diff) | |
download | awx-2ac304d2899f3f2b13c97b2ad30fcf91d8fe90ee.tar.xz awx-2ac304d2899f3f2b13c97b2ad30fcf91d8fe90ee.zip |
allow pytest --migrations to succeed (#14663)23.5.0
* allow pytest --migrations to succeed
* We actually subvert migrations from running in test via pytest.ini
--no-migrations option. This has led to bit rot for the sqlite
migrations happy path. This changeset pays off that tech debt and
allows for an sqlite migration happy path.
* This paves the way for programatic invocation of individual migrations
and weaving of the creation of resources (i.e. Instance, Job Template,
etc). With this, a developer can instantiate various database states,
trigger a migration, assert the state of the db, and then have pytest
rollback all of that.
* I will note that in practice, running these migrations is dog shit
slow BUT this work also opens up the possibility of saving and
re-using sqlite3 database files. Normally, caching is not THE answer
and causes more harm than good. But in this case, our migrations are
mostly write-once (I say mostly because this change set violates
that :) so cache invalidation isn't a major issue.
* functional test for migrations on sqlite
* We commonly subvert running migrations in test land. Test land uses
sqlite. By not constantly exercising this code path it atrophies. The
smoke test here is to continuously exercise that code path.
* Add ci test to run migration tests separately, they take =~ 2-3
minutes each on my laptop.
* The smoke tests also serves as an example of how to write migration
tests.
* run migration tests in ci
Diffstat (limited to '.github/workflows/promote.yml')
0 files changed, 0 insertions, 0 deletions