Test source code
######################################################
To perfrom all unittests:
$> sh test.sh
The default DB-backend is SQLite3
######################################################
To change to other DB-backend (Oracle/MySQL/PostgreSQL), you can follow
this steps:
1. Create two test DB accounts, one of them for migration test.
2. Modify
TestDB.cfg according to your accounts
3. $> sh test.sh
#######################################################
Here is a short list of current test:
#######################################################
TestGenerator.py
generate
TestDB.py and
TestDBManager.py scripts according to
TestDB.cfg
TestDB.py
generate more test schema and fill datas at test database,
schema can load from yaml/sql
TestDBManager.py
test db manager with database test
connect/execute sql/desc schema/migrate/drop/
TestGraph.py
test Graph object
TestConstructQuery.py
test
ConstuctQuery object using Graph
TestQueryBuilder.py
test
QueryBuilder on Schema object
TestParser.py
test PLY parser
TestMapper.py
test mapper function
Test on DBS2
DBS2 deployment on local nodes
cd <DBS Base Directory>
export DBS_BASE_DIR=$PWD
export SCRAM_ARCH=slc4_ia32_gcc345
export APT_VERSION=0.5.15lorg3.2-cms5
wget -O $DBS_BASE_DIR/bootstrap.sh http://cmsrep.cern.ch/cmssw/cms/bootstrap.sh
chmod +x $DBS_BASE_DIR/bootstrap.sh
sh -x $DBS_BASE_DIR/bootstrap.sh setup -path $DBS_BASE_DIR -arch $SCRAM_ARCH -unsupported_distribution_hack
cd $DBS_BASE_DIR
source $SCRAM_ARCH/external/apt/$APT_VERSION/etc/profile.d/init.sh
apt-get update
apt-cache search dbs-apps # find the latest release
apt-get install cms+dbs-apps+DBS_2_0_9_patch_4-cmp # THIS IS AN EXAMPLE, use appropriate latest version