Commit 2711a1d52acb114ae177e207dbaa0b199d91183b

Authored by Rafael Manzo
1 parent ac30fdd5

[Mezuro] Acceptance tests script doesn't depends anymore of a clone from the Kal…

…ibro source code repository
features/support/hooks.rb
1   -Before do
2   - if !$dunit
  1 +Before do
  2 + if !$dunit
3 3 command = "#{RAILS_ROOT}/plugins/mezuro/script/tests/prepare_kalibro_query_file.sh"
4 4 system command
5   - $dunit = true
6   - end
7   -end
  5 + $dunit = true
  6 + end
  7 +end
8 8  
9 9 After ('@kalibro_restart') do
10 10 command = "#{RAILS_ROOT}/plugins/mezuro/script/tests/delete_all_kalibro_entries.sh"
... ...
plugins/mezuro/script/tests/kalibro_scripts.conf
1 1 # Definition of constants used in kalibro scripts.
2 2  
3   -KALIBRO_DIR=~/kalibro
4   -PSQLFILE=$KALIBRO_DIR/KalibroCore/src/META-INF/PostgreSQL.sql
  3 +PSQLFILE=/tmp/PostgreSQL.sql
5 4 DATABASE="kalibro_test"
6 5 PASSWORD="kalibro"
7   -QUERYFILE=/tmp/query
8   -
  6 +QUERYFILE=/tmp/query
9 7 \ No newline at end of file
... ...
plugins/mezuro/script/tests/prepare_kalibro_query_file.sh
1 1 #!/bin/bash
2 2  
3 3 source plugins/mezuro/script/tests/kalibro_scripts.conf
  4 +if ! [ -f $PSQLFILE ]
  5 + then wget http://gitorious.org/kalibro/kalibro/blobs/raw/master/KalibroCore/src/META-INF/PostgreSQL.sql -O $PSQLFILE
  6 +fi
4 7  
5 8 DROPLIMIT="END OF DROP TABLES"
6 9 RANGE=$(grep -n "$DROPLIMIT" $PSQLFILE | cut -d":" -f1)
... ... @@ -14,4 +17,4 @@ if [ -f $QUERYFILE ]
14 17 fi
15 18  
16 19 sed -e "$CUT" -e "$REPLACE" $PSQLFILE > $QUERYFILE
17 20 -sudo chown postgres.postgres $QUERYFILE
  21 +sudo chown postgres.postgres $QUERYFILE
18 22 \ No newline at end of file
... ...