Code

Changes between Version 7 and Version 8 of OracleTestSetup


Ignore:
Timestamp:
11/11/10 14:08:35 (3 years ago)
Author:
ramiro
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OracleTestSetup

    v7 v8  
    1717 
    1818* Oracle XE (10g) 
    19 * GNU/Debian Linux. Things should also work with Ubuntu Linux without too much tweaking. 
     19* GNU/Debian Linux x86. Things should also work with Ubuntu Linux without too much tweaking. 
    2020 
    2121The system isn't going to be dedicated exclusively to run Oracle so we will 
     
    3131   http://www.oracle.com/technetwork/database/express-edition/downloads/index.html 
    3232   (*Oracle Database 10g Express Edition for Linux x86*). You need to have an 
    33    *Oracle Developer Network* account. 
    34    Contrarily to what is suggested in some places_ I've found the newer `.deb` package 
    35    you can get here_ and installable by using high level Debian/Ubuntu package management 
     33   *Oracle Developer Network* account and to accept the licence agreement. 
     34 
     35   Contrarily to what is suggested in some places_ I've found the newer **oracle-xe-universal_10.2.0.1-1.1_i386.deb** package 
     36   you can get here_ (as of Nov 2010) and installable by using high level Debian/Ubuntu package management 
    3637   tools (APT, Aptitude, ...) didn't install things like the ``/etc/init.d/oracle-xe`` init 
    3738   script and some files under the ``/usr/lib/oracle`` hierarchy so I went with the older 
     
    145146   * Run the Django tests 
    146147 
    147    from the same system as the DB engine or from another system through the network. If you chose the 
    148    first option we are done, if you chose the second option for any of the two kinds of access then you 
     148   from the same system where the DB engine is running or from another system through the network. If you chose the 
     149   first option you can skit to the next step, if you chose the second option for any of the two kinds of access then you 
    149150   need to solve the following two issues first (see the `Oracle installation documentation`_ for 
    150151   detailed instructions): 
    151152 
    152    * You will need to install the Oracle client stack. 
     153   * You will need to install the Oracle client stack on your remote system. 
    153154   * By default no access of any type (SQL sessions, admin web app) is allowed through the network to the DB engine, you need to change that by using the administrative web interface or possibly using the `sqlplus` tool. 
    154155 
    155 #. Access the DB engine administration web app by pointing our Web browser to ``http://localhost:8080/apex`` 
     156#. Access the DB engine administration web app by pointing our Web browser to ``http://localhost:8080/apex`` (or ``http://server:8080/apex``) 
    156157   and using the ``SYSTEM`` user plus the password you chose above. 
    157158 
    158159#. Create an user to be used to connect to the DB when running the tests. (e.g. ``djangotest``) 
    159    -- Go to *Home > Administration > Database Users > CREATE* assign it a password (e.g. ``foo``) 
     160   -- Go to *Home > Administration > Database Users > CREATE* assign it a password (e.g. ``tehsekret``) 
    160161 
    161162#. Give the user the needed privileges. 
     
    169170Install cx_Oracle 
    170171================= 
    171 :: 
     172Do this in the system where youwill run your tests:: 
    172173 
    173174    $ sudo apt-get install python-dev 
     
    187188:: 
    188189 
    189     $ cat oracle.py 
     190    $ cat oracle_settings.py 
    190191 
    191192    DATABASES = { 
     
    211212    } 
    212213 
    213 The key is that NAME should be the same ('xe') for both entries, since you're really establishing two connections to the same database. The TEST_USER, TEST_TBLSPACE, and TEST_TBLSPACE_TMP entries must be different, however. Thanks Ian Kelly for providing the correct settings file. 
     214The key is that ``NAME`` should be the same (``'xe'``) for both entries, since you're really establishing two connections to the same database. The ``TEST_USER``, ``TEST_TBLSPACE``, and ``TEST_TBLSPACE_TMP`` entries must be different, however. 
     215 
     216Thanks Ian Kelly for providing the correct settings file. 
    214217 
    215218Test things 
     
    219222    $ sudo /etc/init.d/xe start 
    220223 
    221     $ ./runtests --settings=oracle.py basic 
     224    $ ./runtests.py --settings=oracle_settings.py basic 
    222225 
    223226    Creating test database 'default'...