Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#15327 closed (fixed)

TEST_USER setting has become mandatory on Oracle

Reported by: depaolim Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords: TEST_USER Oracle blocker regression
Cc: depaolim@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

upgrade from django 1.2.1 to django 1.2.5
I run tests and I obtained

KeyError: 'TEST_USER'

My box is:

  • CentOS 5.4
  • oracle-instantclient-basic-10.2.0.4-1.i386.zip
  • oracle-instantclient-devel-10.2.0.4-1.i386.zip
  • cx_Oracle 5.0.4
  • Django 1.2.5

You can easily reproduce the problem:

django-admin.py startproject testdjango
cd testdjango
python manage.py startapp testapp
# edit settings to configure connection to db
python manage.py test
# KeyError: 'TEST_USER'

according to http://code.djangoproject.com/wiki/OracleTestSetup and http://docs.djangoproject.com/en/1.2/ref/settings/#test-user

The TEST_USER setting is optional: The username of such user isn't the same as the 'USER' var, is derived from it by adding a 'test_' prefix. It can be overridden with the value of the 'TEST_USER' var.

Since 1.2.1 this behavior has changed and now the setting is mandatory
Working settings for django 1.2.5 are:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.oracle',
        'NAME': 'test',
        'USER': 'dslcm',
        'PASSWORD': '****',
        'TEST_USER': 'test_dslcm',
        'HOST': '',
        'PORT': '',
    },
}

I wasn't able to find this information in release notes nor in documentation

My humble :) advice is to restore the optionality of this setting, or, otherwise, upgrade the documentation

Attachments (0)

Change History (4)

comment:1 Changed 3 years ago by russellm

  • Keywords blocker regression added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Sounds like an oversight of the database uniqueness check that was added recently. That makes this a blocking regression.

comment:2 Changed 3 years ago by russellm

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 3 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

In [15568]:

Fixed #15327 -- Modified the Oracle test database signature method to allow for the case where TEST_USER is unspecified. Thanks to depaolim for the report.

comment:4 Changed 3 years ago by ramiro

In [15585]:

[1.2.X] Fixed #15327 -- Modified the Oracle test database signature method to allow for the case where TEST_USER is unspecified. Thanks to depaolim for the report.

Backport of [15568]

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.