Opened 9 years ago
Closed 9 years ago
#25899 closed New feature (worksforme)
manage.py tests requires database creation privileges
Reported by: | JorisBenschop | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 1.9 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
From
#https://docs.djangoproject.com/en/1.9/topics/testing/overview/#the-test-database By default the test databases get their names by prepending test_ to the value of the NAME settings for the databases defined in DATABASES.
I guess this works great on sqlite and my homegrown postgres machine, but I'm developing applications on Oracle RAC clusters, and I hope you can see this is not an environment I'd be allowed to create databases on. The database schemas are rather complex (using things like RAW(16) primary keys and reference-based partitioning) and I'm not allowing Django to make the tables itself.
I have been unable to find a workaround in documentation (e.g. --use-this-database-instead-of-creating-one= and --assume-models-are-present ). If this exists, please change this ticket into a documentation request instead.
Change History (8)
comment:1 by , 9 years ago
Component: | Uncategorized → Testing framework |
---|
comment:2 by , 9 years ago
comment:3 by , 9 years ago
There are TEST
parameters for this -- Everything from CREATE_DB onwards is essentially serving the need you raise here. Note that settings are much more appropriate than command arguments for this use-case.
Can you offer a documentation change that will make these settings easier to find?
(NAME
, specifically, has a very different meaning on Oracle -- it selects the service to connect to, rather than a database on that service like it does for other backends.)
comment:4 by , 9 years ago
Doc proposal for the testings docs.
Maybe a subsection under Oracle in docs/ref/databases.txt
could also be added if we need more details about those Oracle specific settings?
comment:5 by , 9 years ago
Apologies, I should have read more thoroughly. I will use the pointers given. Thanks for the docs improvement also. I guess this ticket can be resolved-fixed-closed?
comment:8 by , 9 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
A couple sentences after the one you quoted, "If you want to use a different database name, specify NAME in the TEST dictionary for any given database in DATABASES." Could you combine this with the
manage.py test --keepdb
option to get the desired result?