DatabaseResource.make() sends creation to a non-global facade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.db |
Triaged
|
Medium
|
Mike Bayer |
Bug Description
Trying to actually use a GeneratesSchema facade with a project that has its own TransactionCont
Changed in oslo.db: | |
assignee: | nobody → Mike Bayer (zzzeek) |
Changed in oslo.db: | |
status: | New → Triaged |
importance: | Undecided → Medium |
OK, research has been done. The problem is that hooks like GeneratesSchema .generate_ schema_ create_ all are called before we apply the ReplaceEngineFa cadeFixture to patch the local enginefacade into the one given to us by the application. Since it's common that tests want to use their normal enginefacade- enabled application code to set up test data, this causes things to not work. As a workaround, a fixture can do this:
def generate_ schema_ create_ all(self, engine):
migration. create_ schema( engine)
engine)
# do enginefacade- specific setup
this is what I've done in placement for now.