Opened 11 years ago

Closed 11 years ago

#499 closed defect (fixed)

Import script for Multipoint test dataset to use common systemtest configuration

Reported by: Piero Campalani Owned by: Alireza
Priority: major Milestone: 9.0
Component: systemtest Version: 8.5
Keywords: multipoint import Cc:
Complexity: Easy

Description

The python script used to ingest the test multipoint dataset for the systemtests is now using own configuration variables to connect to the petascopedb.
Instead, it need to take that information from the common configuration file of the systemtest, which is ./systemtest/conf/test.cfg.

Description:

FIXME file:
./systemtest/util/import_pointcloud.py

PROBLEM: duplicated configuration variables:
 13 DB_NAME = "petascopedb"
 14 HOST_NAME = "localhost"
 15 USER_NAME = "petauser"
 16 PASSW = "petapasswd"

FIX: do not assign their value as string inside the .py file, like "petauser", but instead fetch the info from THE configuration file of the systemtest suites, which is:

                    ./systemtest/conf/test.cfg

SOLUTION: test.cfg *exports* the variables in the user environment, so the script should simply read them with python libraries.
Should be straightforward with `os' package:

    import os
    ...
    DB_NAME = os.environ['PS_DB']

Change History (3)

comment:1 by Dimitar Misev, 11 years ago

Also is it possible to get rid of psycopg? Can't we just stick to use psql, it works well for everything else.

comment:2 by Dimitar Misev, 11 years ago

Shouldn't this be closed btw?

comment:3 by Dimitar Misev, 11 years ago

Resolution: fixed
Status: newclosed

Alireza please close your tickets when you fix them…

changeset:1d387d9cd3dec0ac5ebc79b2bec3ff63caffdfe0

Note: See TracTickets for help on using tickets.