Opened 4 years ago

Closed 2 years ago

#25898 closed Bug (fixed)

test database creation on Oracle mistakes privilege error for existing database

Reported by: JorisBenschop Owned by: felixxm
Component: Testing framework Version: 1.9
Severity: Normal Keywords: oracle test
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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"

Change History (7)

comment:1 Changed 4 years ago by JorisBenschop

Summary: manage.py test mistakes privilege error for existing databasmanage.py test mistakes privilege error for existing database

comment:2 Changed 4 years ago by Aymeric Augustin

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.

comment:3 Changed 4 years ago by Tim Graham

Summary: manage.py test mistakes privilege error for existing databasetest database creation on Oracle mistakes privilege error for existing database
Triage Stage: UnreviewedAccepted

comment:4 Changed 2 years ago by felixxm

Owner: changed from nobody to felixxm
Status: newassigned

comment:5 Changed 2 years ago by felixxm

Has patch: set

comment:6 Changed 2 years ago by Shai Berger

Triage Stage: AcceptedReady for checkin

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

comment:7 Changed 2 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 965f678a:

Fixed #25898 -- Made test database/user creation on Oracle reraise unexpected errors.

Thanks Shai Berger and Tim Graham for review.

Note: See TracTickets for help on using tickets.
Back to Top