-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from d-ylee/migrationRequestTests
Migration Request Integration Tests Concept
- Loading branch information
Showing
14 changed files
with
1,402 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# Starts the DBSMigrate and DBSMigration servers for migration request tests | ||
# TODO: Creates a dbs database snapshot depending on migration requests files | ||
# X509_USER_CERT and X509_USER_KEY need to be defined in order to grab data from the production server | ||
|
||
# Stop currently running dbs2go processes | ||
pkill dbs2go | ||
|
||
# Reset the sqlite database for the snapshot | ||
cd test && rm -f /tmp/dbs-test.db && \ | ||
sqlite3 /tmp/dbs-test.db < ../static/schema/sqlite-schema.sql && \ | ||
|
||
cd .. | ||
|
||
# Start dbs-migrate | ||
X509_USER_CERT=$X509_USER_CERT X509_USER_KEY=$X509_USER_KEY \ | ||
./dbs2go -config ./migrate.json & | ||
echo $! >> ./test-pids | ||
sleep 1 | ||
|
||
# Start dbs-migration | ||
X509_USER_CERT=$X509_USER_CERT X509_USER_KEY=$X509_USER_KEY \ | ||
./dbs2go -config ./migration.json & | ||
echo $! >> ./test-pids | ||
|
||
sleep 1 | ||
|
||
# Read and process migration requests from directory | ||
REQUESTS=$PWD/test/data/migration/requests/*.json | ||
for f in $REQUESTS | ||
do | ||
echo "Processing $f file..." | ||
X509_USER_CERT=$X509_USER_CERT X509_USER_KEY=$X509_USER_KEY \ | ||
curl -H "Content-Type: application/json" \ | ||
http://localhost:9898/dbs2go/submit \ | ||
-d@$f | ||
done | ||
#curl --cacert "$CA_CERT" --cert $X509_USER_CERT --key $X509_USER_KEY --header 'Content-Type: application/json' --verbose https://cmsweb.cern.ch/dbs/prod/global/DBSReader/blockdump?block_name=/GenericTTbar/HC-CMSSW_9_2_6_91X_mcRun1_realistic_v2-v2/AODSIM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Migration Requests | ||
* Place migration requests as JSON format in this directory. | ||
* Run `db_snapshot` to start the DBSMigrate and DBSMigration servers | ||
* Currently commented are the scripts to create a snapshot of datasets into a local database. | ||
* Run `make test-migration-requests` afterwards to test migration requests in this directory. |
Oops, something went wrong.