From 4f282921c462e348b48d8a27a00cc4d0d8c006f6 Mon Sep 17 00:00:00 2001 From: Jess G Date: Tue, 10 Dec 2019 11:18:02 -0800 Subject: [PATCH] jenkins: run storj-sim integration tests with cockraochdb (#3723) * add integration tests to jenksin * have jenkins run storj-sim integration tests w/crdb Change-Id: I696d55c5894aaf630dcd7a566e1dd705ee88486b * rm crdb integration tests to see if postgres passes Change-Id: I1727a027ff802acbff5fc55961a0d605faefcf2d * comment out aws tests to see if that is the error Change-Id: I456c3d36f6a4ce7760ea0b6c402b6ea16cfe77e3 * add aws profile to integration tests Change-Id: Ic01185dbc7b84ac48dfb846f8f272b34b50379b6 * add tmp path for aws profile and creds Change-Id: I7b82ee5a99937edd3f66ae01bfb5cb21028a62cf * change linux KiB syntax to bytes to support osx Change-Id: Ia1f1027ba8da64a6ba537062deb9b3519973621f --- Jenkinsfile.public | 29 ++++++++++++++--------------- scripts/test-sim-aws.sh | 4 ++++ scripts/test-uplink.sh | 8 ++++---- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/Jenkinsfile.public b/Jenkinsfile.public index 14bd158df..35c998c6d 100644 --- a/Jenkinsfile.public +++ b/Jenkinsfile.public @@ -103,6 +103,20 @@ pipeline { } } + stage('Cockroach Integration') { + environment { + STORJ_NETWORK_HOST4 = '127.0.0.4' + STORJ_NETWORK_HOST6 = '127.0.0.4' + + STORJ_SIM_POSTGRES = 'cockroach://root@localhost:26257/testcockroach4?sslmode=disable' + } + + steps { + sh 'cockroach sql --insecure --host=localhost:26257 -e \'create database testcockroach4;\'' + sh 'make test-sim' + } + } + stage('Backwards Compatibility') { environment { STORJ_NETWORK_HOST4 = '127.0.0.3' @@ -117,21 +131,6 @@ pipeline { } } - stage('CockroachDB migration compatibility') { - environment { - STORJ_COCKROACH_TEST = 'cockroach://root@localhost:26257/teststorj?sslmode=disable' - STORJ_POSTGRES_TEST = 'postgres://postgres@localhost/teststorj4?sslmode=disable' - } - - steps { - // Until we can run all the unit tests with cockroach (i.e. all the sql is fixed to be cockroachdb compatible), - // lets just run a bare bones test here that sets up testplanet and runs the database migration - sh 'psql -U postgres -c \'create database teststorj4;\'' - sh 'cockroach sql --insecure --host=localhost:26257 -e \'create database teststorj;\'' - sh 'cd private/testplanet && go test ./... -run=TestRun' - } - } - stage('Build [gomobile]') { steps { // just to verify its building with recent changes diff --git a/scripts/test-sim-aws.sh b/scripts/test-sim-aws.sh index 2f577c1ed..97c02a017 100755 --- a/scripts/test-sim-aws.sh +++ b/scripts/test-sim-aws.sh @@ -12,6 +12,10 @@ SRC_DIR=$TMPDIR/source DST_DIR=$TMPDIR/dst mkdir -p "$SRC_DIR" "$DST_DIR" + +export AWS_CONFIG_FILE=$TMPDIR/.aws/config +export AWS_SHARED_CREDENTIALS_FILE=$TMPDIR/.aws/credentials + aws configure set aws_access_key_id "$GATEWAY_0_ACCESS_KEY" aws configure set aws_secret_access_key "$GATEWAY_0_SECRET_KEY" aws configure set default.region us-east-1 diff --git a/scripts/test-uplink.sh b/scripts/test-uplink.sh index 1616f3ad0..72e835a01 100755 --- a/scripts/test-uplink.sh +++ b/scripts/test-uplink.sh @@ -22,10 +22,10 @@ random_bytes_file () { head -c $size $output } -random_bytes_file "2KiB" "$SRC_DIR/small-upload-testfile" # create 2kb file of random bytes (inline) -random_bytes_file "5MiB" "$SRC_DIR/big-upload-testfile" # create 5mb file of random bytes (remote) -random_bytes_file "12MiB" "$SRC_DIR/multisegment-upload-testfile" # create 2 x 6mb file of random bytes (remote) -random_bytes_file "9MiB" "$SRC_DIR/diff-size-segments" # create 9mb file of random bytes (remote) +random_bytes_file "2048" "$SRC_DIR/small-upload-testfile" # create 2kb file of random bytes (inline) +random_bytes_file "5242880" "$SRC_DIR/big-upload-testfile" # create 5mb file of random bytes (remote) +random_bytes_file "12582912" "$SRC_DIR/multisegment-upload-testfile" # create 2 x 6mb file of random bytes (remote) +random_bytes_file "9437184" "$SRC_DIR/diff-size-segments" # create 9mb file of random bytes (remote) UPLINK_DEBUG_ADDR=""