From 2a33f443177e0be3343e89b2e0d78d3efae273e0 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Fri, 7 Aug 2020 15:24:13 +0200 Subject: [PATCH] fix e2e tests --- e2e/data_setup.sh | 4 ++-- manager/s3_storage.go | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/data_setup.sh b/e2e/data_setup.sh index a6dfae4..9b1ee17 100755 --- a/e2e/data_setup.sh +++ b/e2e/data_setup.sh @@ -19,6 +19,6 @@ mysql -u lbry -plbry -D lbry -h "127.0.0.1" -P 15500 -e "$ADDYTSYNCER" ADDYTSYNCAUTHTOKEN='INSERT INTO auth_token (user_id, value) VALUE(2,"youtubertoken")' mysql -u lbry -plbry -D lbry -h "127.0.0.1" -P 15500 -e "$ADDYTSYNCAUTHTOKEN" #Add their youtube channel to be synced -ADDYTCHANNEL="INSERT INTO youtube_data (user_id, status_token,desired_lbry_channel,channel_id,channel_name,status,created_at,source,total_videos,total_subscribers,should_sync,redeemable,total_views,reviewed,last_uploaded_video) -VALUE(2,'3qzGyuVjQaf7t4pKKu2Er1NRW2LJkeWw','@beamertest','UCNQfQvFMPnInwsU_iGYArJQ','BeamerAtLBRY','queued','2019-08-01 00:00:00','sync',10,10,1,1,10000,1,'7bBV2Z-9wpo')" +ADDYTCHANNEL="INSERT INTO youtube_data (user_id, status_token,desired_lbry_channel,channel_id,channel_name,status,created_at,source,total_videos,total_subscribers,should_sync,redeemable,total_views,reviewed,last_uploaded_video,length_limit,size_limit) +VALUE(2,'3qzGyuVjQaf7t4pKKu2Er1NRW2LJkeWw','@test"$(date +%s)"','UCNQfQvFMPnInwsU_iGYArJQ','BeamerAtLBRY','queued','2019-08-01 00:00:00','sync',10,10,1,1,10000,1,'7bBV2Z-9wpo',60,2048)" mysql -u lbry -plbry -D lbry -h "127.0.0.1" -P 15500 -e "$ADDYTCHANNEL" diff --git a/manager/s3_storage.go b/manager/s3_storage.go index d682b9c..6c8e551 100644 --- a/manager/s3_storage.go +++ b/manager/s3_storage.go @@ -83,6 +83,9 @@ func (s *Sync) downloadWallet() error { } func (s *Sync) downloadBlockchainDB() error { + if logUtils.IsRegTest() { + return nil // tests fail if we re-use the same blockchain DB + } defaultBDBDir, defaultTempBDBDir, key, err := s.getBlockchainDBPaths() if err != nil { return errors.Err(err)