#35222 closed Cleanup/optimization (invalid)

Update tablespaces tests

Reported by: bcail Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: bcail Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by bcail)

Tablespaces tests currently have a note saying that DEFAULT_TABLESPACE and DEFAULT_INDEX_TABLESPACE can't be tested. The test models are marked as unmanaged, then changed to managed, ...

Couldn't we re-write these tests using models defined in the test, so these issues would go away? I'm thinking of something like what's used in the schema tests.

I came across this issue when working on ticket #20960.

(Note: I had to take out the URLs because they're being rejected as "potential spam.")

Change History (5)

comment:1 by bcail, 10 months ago

Description: modified (diff)

comment:2 by bcail, 10 months ago

Description: modified (diff)

comment:3 by Mariusz Felisiak, 10 months ago

Component: Database layer (models, ORM)Core (Other)
Resolution: needsinfo
Status: newclosed

As far as I'm aware, you think that these tests should be improved but without any concrete proposition. I don't think it's really worth spending time on it, but I'm happy to review your patch.

We can reconsider this decision if you (someone) provide PoC.

comment:4 by bcail, 10 months ago

Resolution: needsinfo
Status: closednew

I opened a draft PR. It removes the need for having to change models from unmanaged to managed, and tests with and without the DEFAULT_INDEX_TABLESPACE being set.

If we use these changes, we could also add tests for the DEFAULT_TABLESPACE, and update tests in tests/model_indexes/tests.py.

comment:5 by bcail, 10 months ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top