Opened 11 years ago

Last modified 11 years ago

#484 closed defect

systemtest import functions not to rely on database IDs — at Version 1

Reported by: Piero Campalani Owned by: Piero Campalani
Priority: minor Milestone: 9.0
Component: systemtest Version: 8.5
Keywords: Cc:
Complexity: Easy

Description (last modified by Piero Campalani)

Some INSERT statements in the systemtest import functions rely on database IDs.

This is related to functions in ./systemtest/util/petascope.sh:

$ egrep 'PS_crsset|PS_Range' ./systemtest/util/petascope.sh -r
  $PSQL -c "delete from PS_Range where coverage = $c_id" > /dev/null
  $PSQL -c "delete from PS_crsset where axis = $x_id" > /dev/null
  $PSQL -c "delete from PS_crsset where axis = $y_id" > /dev/null
  $PSQL -c "insert into PS_Range (coverage, i, name, type) values ($c_id, 0, 'value', 4)" > /dev/null || exit $RC_ERROR
  $PSQL -c "insert into PS_crsset ( axis, crs) values ( $x_id, 9)" > /dev/null || exit $RC_ERROR
  $PSQL -c "insert into PS_crsset ( axis, crs) values ( $y_id, 9)" > /dev/null || exit $RC_ERROR
  $PSQL -c "insert into PS_crsset ( axis, crs) values ( $t_id, 8)" > /dev/null || exit $RC_ERROR
  $PSQL -c "insert into PS_Range (coverage, i, name, type) values ($c_id, 0, 'red', 7)" > /dev/null
  $PSQL -c "insert into PS_Range (coverage, i, name, type) values ($c_id, 1, 'green', 7)" > /dev/null
  $PSQL -c "insert into PS_Range (coverage, i, name, type) values ($c_id, 2, 'blue', 7)" > /dev/null
  $PSQL -c "insert into PS_crsset ( axis, crs) values ( $x_id, 8)" > /dev/null
  $PSQL -c "insert into PS_crsset ( axis, crs) values ( $y_id, 8)" > /dev/null
  $PSQL -c "insert into PS_Range (coverage, i, name, type) values ($c_id, 0, 'value', 2)" > /dev/null
  $PSQL -c "insert into PS_crsset ( axis, crs) values ( $x_id, 8)" > /dev/null
  $PSQL -c "insert into PS_crsset ( axis, crs) values ( $y_id, 8)" > /dev/null
  $PSQL -c "insert into PS_Range (coverage, i, name, type) values ($c_id, 0, 'value', 2)" > /dev/null
  $PSQL -c "insert into PS_crsset ( axis, crs) values ( $x_id, 9)" > /dev/null
  $PSQL -c "insert into PS_crsset ( axis, crs) values ( $y_id, 9)" > /dev/null

Change History (1)

comment:1 by Piero Campalani, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.