From ff6df3fccc4270659a3d239f0fda352fb9de5e83 Mon Sep 17 00:00:00 2001 From: Nicolas Humbert Date: Mon, 2 Apr 2018 17:39:20 -0700 Subject: [PATCH 1/2] FX: functional tests --- lib/Config.js | 2 +- tests.bash | 42 +++++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lib/Config.js b/lib/Config.js index e648144530..d919a8e909 100644 --- a/lib/Config.js +++ b/lib/Config.js @@ -373,7 +373,7 @@ class Config extends EventEmitter { assert(externalBackends[type], 'bad config: `type` ' + 'property of `replicationEndpoints` object must be ' + 'a valid external backend (one of: "' + - `${Object.keys(externalBackends).join('", "')}")`); + `${Object.keys(externalBackends).join('", "')})`); } else { assert.notStrictEqual(servers, undefined, 'bad config: ' + 'each object of `replicationEndpoints` array that is ' + diff --git a/tests.bash b/tests.bash index 408162e01c..55ddd75f6c 100644 --- a/tests.bash +++ b/tests.bash @@ -100,37 +100,37 @@ fi if [ $CIRCLE_NODE_INDEX -eq 2 ] then - S3BACKEND=mem MPU_TESTING=yes npm start > $CIRCLE_ARTIFACTS/server_mem_awssdk.txt & bash wait_for_local_port.bash 8000 40 && npm run ft_awssdk + S3BACKEND=mem MPU_TESTING=yes npm start > $CIRCLE_ARTIFACTS/server_mem_awssdk.txt & bash wait_for_local_port.bash 8000 40 && S3DATA=file npm run ft_awssdk killandsleep 8000 - S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_s3cmd.txt & bash wait_for_local_port.bash 8000 40 && npm run ft_s3cmd + S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_s3cmd.txt & bash wait_for_local_port.bash 8000 40 && S3DATA=file npm run ft_s3cmd killandsleep 8000 - S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_s3curl.txt & bash wait_for_local_port.bash 8000 40 && npm run ft_s3curl + S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_s3curl.txt & bash wait_for_local_port.bash 8000 40 && S3DATA=file npm run ft_s3curl killandsleep 8000 - S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_rawnode.txt & bash wait_for_local_port.bash 8000 40 && npm run ft_node + S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_rawnode.txt & bash wait_for_local_port.bash 8000 40 && S3DATA=file npm run ft_node killandsleep 8000 # Run S3 with mem Backend + KMS Encryption ; run ft_tests - S3BACKEND=mem MPU_TESTING=yes npm start > $CIRCLE_ARTIFACTS/server_mem_kms_awssdk.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true npm run ft_awssdk + S3BACKEND=mem MPU_TESTING=yes npm start > $CIRCLE_ARTIFACTS/server_mem_kms_awssdk.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true S3DATA=file npm run ft_awssdk killandsleep 8000 - S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_kms_s3cmd.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true npm run ft_s3cmd + S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_kms_s3cmd.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true S3DATA=file npm run ft_s3cmd killandsleep 8000 - S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_kms_s3curl.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true npm run ft_s3curl + S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_kms_s3curl.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true S3DATA=file npm run ft_s3curl killandsleep 8000 - S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_kms_rawnode.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true npm run ft_node + S3BACKEND=mem npm start > $CIRCLE_ARTIFACTS/server_mem_kms_rawnode.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true S3DATA=file npm run ft_node killandsleep 8000 @@ -138,10 +138,10 @@ then mkdir /tmp/mongodb docker run -d -p 27018:27017 -v /tmp/mongodb:/data/db mongo:3.6.2 bash wait_for_local_port.bash 27018 40 - S3BACKEND=mem MPU_TESTING=yes S3METADATA=mongodb npm start > $CIRCLE_ARTIFACTS/server_mongodb_awssdk.txt & bash wait_for_local_port.bash 8000 40 && npm run ft_test + S3BACKEND=mem MPU_TESTING=yes S3METADATA=mongodb npm start > $CIRCLE_ARTIFACTS/server_mongodb_awssdk.txt & bash wait_for_local_port.bash 8000 40 && S3DATA=file npm run ft_test killandsleep 8000 - + fi if [ $CIRCLE_NODE_INDEX -eq 3 ] @@ -149,49 +149,49 @@ then # Run S3 with file Backend ; run ft_tests - S3BACKEND=file S3VAULT=mem MPU_TESTING=yes npm start > $CIRCLE_ARTIFACTS/server_file_awssdk.txt & bash wait_for_local_port.bash 8000 40 && npm run ft_awssdk + S3BACKEND=file S3VAULT=mem MPU_TESTING=yes npm start > $CIRCLE_ARTIFACTS/server_file_awssdk.txt & bash wait_for_local_port.bash 8000 40 && S3DATA=file npm run ft_awssdk killandsleep 8000 - S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_management.txt & bash wait_for_local_port.bash 8000 40 && npm run ft_management + S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_management.txt & bash wait_for_local_port.bash 8000 40 && S3DATA=file npm run ft_management killandsleep 8000 - S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_s3cmd.txt & bash wait_for_local_port.bash 8000 40 && npm run ft_s3cmd + S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_s3cmd.txt & bash wait_for_local_port.bash 8000 40 && S3DATA=file npm run ft_s3cmd killandsleep 8000 - S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_s3curl.txt & bash wait_for_local_port.bash 8000 40 && npm run ft_s3curl + S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_s3curl.txt & bash wait_for_local_port.bash 8000 40 && S3DATA=file npm run ft_s3curl killandsleep 8000 - S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_rawnode.txt & bash wait_for_local_port.bash 8000 40 && npm run ft_node + S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_rawnode.txt & bash wait_for_local_port.bash 8000 40 && S3DATA=file npm run ft_node killandsleep 8000 # Run S3 with file Backend + KMS Encryption ; run ft_tests - S3BACKEND=file S3VAULT=mem MPU_TESTING=yes npm start > $CIRCLE_ARTIFACTS/server_file_kms_awssdk.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true npm run ft_awssdk + S3BACKEND=file S3VAULT=mem MPU_TESTING=yes npm start > $CIRCLE_ARTIFACTS/server_file_kms_awssdk.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true S3DATA=file npm run ft_awssdk killandsleep 8000 - S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_kms_s3cmd.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true npm run ft_s3cmd + S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_kms_s3cmd.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true S3DATA=file npm run ft_s3cmd killandsleep 8000 - S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_kms_s3curl.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true npm run ft_s3curl + S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_kms_s3curl.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true S3DATA=file npm run ft_s3curl killandsleep 8000 - S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_kms_rawnode.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true npm run ft_node + S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_kms_rawnode.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true S3DATA=file npm run ft_node killandsleep 8000 - S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_kms_management.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true npm run ft_management + S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_kms_management.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true S3DATA=file npm run ft_management killandsleep 8000 - S3BACKEND=mem ENABLE_LOCAL_CACHE=true npm start > $CIRCLE_ARTIFACTS/server_mem_healthchecks.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_LOCAL_CACHE=true npm run ft_healthchecks + S3BACKEND=mem ENABLE_LOCAL_CACHE=true npm start > $CIRCLE_ARTIFACTS/server_mem_healthchecks.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_LOCAL_CACHE=true S3DATA=file npm run ft_healthchecks killandsleep 8000 From abfd54f9fd9376fd57cdbe7e908af47ac3bcea82 Mon Sep 17 00:00:00 2001 From: Nicolas Humbert Date: Tue, 3 Apr 2018 10:47:29 -0700 Subject: [PATCH 2/2] [SQUASH ME] FX TESTS: cleanup(config) changed --- tests.bash | 4 ++-- tests/functional/report/checkRoutes.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests.bash b/tests.bash index 55ddd75f6c..8f5f3a8a38 100644 --- a/tests.bash +++ b/tests.bash @@ -153,7 +153,7 @@ then killandsleep 8000 - S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_management.txt & bash wait_for_local_port.bash 8000 40 && S3DATA=file npm run ft_management + REMOTE_MANAGEMENT_DISABLE=0 S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_management.txt & bash wait_for_local_port.bash 8000 40 && npm run ft_management killandsleep 8000 @@ -187,7 +187,7 @@ then killandsleep 8000 - S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_kms_management.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true S3DATA=file npm run ft_management + REMOTE_MANAGEMENT_DISABLE=0 S3BACKEND=file S3VAULT=mem npm start > $CIRCLE_ARTIFACTS/server_file_kms_management.txt & bash wait_for_local_port.bash 8000 40 && ENABLE_KMS_ENCRYPTION=true npm run ft_management killandsleep 8000 diff --git a/tests/functional/report/checkRoutes.js b/tests/functional/report/checkRoutes.js index 1682d0c7c8..2baa1a6211 100644 --- a/tests/functional/report/checkRoutes.js +++ b/tests/functional/report/checkRoutes.js @@ -69,7 +69,7 @@ describe('Report route', () => { it('should contain config', done => { queryReport(done, response => { - if (!response.config || !response.config.locationConstraints) { + if (!response.config || !response.config.overlayVersion) { return done(new Error('response missing config')); } return done();