Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14921 closed (fixed)

Cannot run tests against oracle db on trunk

Reported by: kmtracey Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

After r14861, I cannot run tests using Oracle backend. I get:

Creating test database for alias 'default' ('test_XE')...
_create_test_db(): dbname = test_XE
CREATE TABLESPACE test_XE
               DATAFILE 'test_XE.dbf' SIZE 20M
               REUSE AUTOEXTEND ON NEXT 10M MAXSIZE 200M

CREATE TEMPORARY TABLESPACE test_XE_temp
               TEMPFILE 'test_XE_temp.dbf' SIZE 20M
               REUSE AUTOEXTEND ON NEXT 10M MAXSIZE 100M

Creating test user...
_create_test_user(): username = test_system
CREATE USER test_system
               IDENTIFIED BY Im_a_lumberjack
               DEFAULT TABLESPACE test_XE
               TEMPORARY TABLESPACE test_XE_temp

GRANT CONNECT, RESOURCE TO test_system
Traceback (most recent call last):
  File "runtests.py", line 314, in <module>
    failures = django_tests(int(options.verbosity), options.interactive, options.failfast, args)
  File "runtests.py", line 183, in django_tests
    failures = test_runner.run_tests(test_labels, extra_tests=extra_tests)
  File "C:\u\kmt\django\trunk\django\test\simple.py", line 362, in run_tests
    old_config = self.setup_databases()
  File "C:\u\kmt\django\trunk\django\test\simple.py", line 299, in setup_databases
    test_db_name = connection.creation.create_test_db(self.verbosity, autoclobber=not self.interactive)
  File "C:\u\kmt\django\trunk\django\db\backends\creation.py", line 355, in create_test_db
    self.connection.features.confirm()
  File "C:\u\kmt\django\trunk\django\db\backends\__init__.py", line 169, in confirm
    self.supports_transactions = self._supports_transactions()
  File "C:\u\kmt\django\trunk\django\db\backends\__init__.py", line 174, in _supports_transactions
    cursor = self.connection.cursor()
  File "C:\u\kmt\django\trunk\django\db\backends\__init__.py", line 77, in cursor
    cursor = self._cursor()
  File "C:\u\kmt\django\trunk\django\db\backends\oracle\base.py", line 407, in _cursor
    self.connection = Database.connect(conn_string, **conn_params)
cx_Oracle.DatabaseError: ORA-12154: TNS:could not resolve the connect identifier specified

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from Cannot connect to oracle db on trunk to Cannot run tests against oracle db on trunk

comment:2 Changed 3 years ago by ramiro

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

(In [14993]) Fixed #14921 -- Tweak changes made in r14861 for the Oracle backend so the test runner can actually create the test DB. Thanks Karen for the report.

In Oracle, the name of a DB as handled by Django hasn't a counterpart anyway. So use the 'production DB name' as it was done before.

comment:3 Changed 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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.