Opened 9 months ago
Closed 9 months ago
#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 )
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 , 9 months ago
Description: | modified (diff) |
---|
comment:2 by , 9 months ago
Description: | modified (diff) |
---|
comment:3 by , 9 months ago
Component: | Database layer (models, ORM) → Core (Other) |
---|---|
Resolution: | → needsinfo |
Status: | new → closed |
comment:4 by , 9 months ago
Resolution: | needsinfo |
---|---|
Status: | closed → new |
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 , 9 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
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.