- if [[ -s "$CONFIGSRC/config.yml" ]] ; then
- cp "$CONFIGSRC/config.yml" "$temp/test-config.yml"
- export ARVADOS_CONFIG="$temp/test-config.yml"
- else
- if [[ -s /etc/arvados/config.yml ]] ; then
- python > "$temp/test-config.yml" <<EOF
-import yaml
-import json
-v = list(yaml.safe_load(open('/etc/arvados/config.yml'))['Clusters'].values())[0]['PostgreSQL']
-v['Connection']['dbname'] = 'arvados_test'
-print(json.dumps({"Clusters": { "zzzzz": {'PostgreSQL': v}}}))
-EOF
- export ARVADOS_CONFIG="$temp/test-config.yml"
- else
- if [[ ! -f "$WORKSPACE/services/api/config/database.yml" ]]; then
- fatal "Please provide a database.yml file for the test suite"
- fi
- fi
- fi
-