[Django] #25898: manage.py test mistakes privilege error for existing databas

60 views
Skip to first unread message

Django

unread,
Dec 9, 2015, 3:55:30 AM12/9/15
to django-...@googlegroups.com
#25898: manage.py test mistakes privilege error for existing databas
-----------------------------------+-------------------------
Reporter: JorisBenschop | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.9
Severity: Normal | Keywords: oracle test
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+-------------------------
If I run "manage.py test" on Oracle 12 the following occurs:
{{{
$ ./manage.py test
Creating test database for alias 'default'...
Failed (ORA-01031: insufficient privileges
)
Got an error creating the test database: ORA-01031: insufficient
privileges

It appears the test database, test_GFJOM_prada_, already exists. Type
'yes' to delete it, or 'no' to cancel:
}}}

To me this seems that the error ('you are not allowed to create a db
because you have no privs for that" is mistaken for "the db already exists
thus you cannot make it"

--
Ticket URL: <https://code.djangoproject.com/ticket/25898>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 9, 2015, 4:12:15 AM12/9/15
to django-...@googlegroups.com
#25898: manage.py test mistakes privilege error for existing database
-----------------------------------+--------------------------------------

Reporter: JorisBenschop | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.9
Severity: Normal | Resolution:

Keywords: oracle test | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by JorisBenschop):

* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/25898#comment:1>

Django

unread,
Dec 9, 2015, 5:40:03 AM12/9/15
to django-...@googlegroups.com
#25898: manage.py test mistakes privilege error for existing database
-----------------------------------+--------------------------------------

Reporter: JorisBenschop | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.9
Severity: Normal | Resolution:

Keywords: oracle test | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------

Comment (by aaugustin):

As a workaround, you can try `manage.py test --keep-db`. I'm not saying
this is the ideal resolution of this ticket. I'm just trying to give you a
way forwards while we figure out a solution.

--
Ticket URL: <https://code.djangoproject.com/ticket/25898#comment:2>

Django

unread,
Dec 9, 2015, 7:39:02 AM12/9/15
to django-...@googlegroups.com
#25898: test database creation on Oracle mistakes privilege error for existing
database
-----------------------------------+------------------------------------

Reporter: JorisBenschop | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.9
Severity: Normal | Resolution:
Keywords: oracle test | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


Comment:

Code in question:
https://github.com/django/django/blob/1aa8bf9b43bbc214770389b9b8d084552040fa44/django/db/backends/oracle/creation.py#L37-L48

--
Ticket URL: <https://code.djangoproject.com/ticket/25898#comment:3>

Django

unread,
Feb 2, 2017, 1:20:55 PM2/2/17
to django-...@googlegroups.com
#25898: test database creation on Oracle mistakes privilege error for existing
database
-----------------------------------+------------------------------------
Reporter: JorisBenschop | Owner: felixxm
Type: Bug | Status: assigned

Component: Testing framework | Version: 1.9
Severity: Normal | Resolution:
Keywords: oracle test | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by felixxm):

* owner: nobody => felixxm
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/25898#comment:4>

Django

unread,
Feb 2, 2017, 1:40:10 PM2/2/17
to django-...@googlegroups.com
#25898: test database creation on Oracle mistakes privilege error for existing
database
-----------------------------------+------------------------------------
Reporter: JorisBenschop | Owner: felixxm
Type: Bug | Status: assigned
Component: Testing framework | Version: 1.9
Severity: Normal | Resolution:
Keywords: oracle test | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by felixxm):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/8015 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/25898#comment:5>

Django

unread,
Feb 7, 2017, 4:13:41 PM2/7/17
to django-...@googlegroups.com
#25898: test database creation on Oracle mistakes privilege error for existing
database
-------------------------------------+-------------------------------------

Reporter: JorisBenschop | Owner: felixxm
Type: Bug | Status: assigned
Component: Testing framework | Version: 1.9
Severity: Normal | Resolution:
Keywords: oracle test | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Shai Berger):

* stage: Accepted => Ready for checkin


Comment:

I think the PR is almost good to go, left minor style comments.

--
Ticket URL: <https://code.djangoproject.com/ticket/25898#comment:6>

Django

unread,
Feb 9, 2017, 5:55:17 PM2/9/17
to django-...@googlegroups.com
#25898: test database creation on Oracle mistakes privilege error for existing
database
-------------------------------------+-------------------------------------
Reporter: JorisBenschop | Owner: felixxm
Type: Bug | Status: closed

Component: Testing framework | Version: 1.9
Severity: Normal | Resolution: fixed

Keywords: oracle test | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"965f678a39b79f8e0bdc8222df094916fd7f8ed4" 965f678a]:
{{{
#!CommitTicketReference repository=""
revision="965f678a39b79f8e0bdc8222df094916fd7f8ed4"
Fixed #25898 -- Made test database/user creation on Oracle reraise
unexpected errors.

Thanks Shai Berger and Tim Graham for review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25898#comment:7>

Reply all
Reply to author
Forward
0 new messages