From 11d82924e9c211e71b3f0b5e8cd2c80cb18850e7 Mon Sep 17 00:00:00 2001 From: "m.malygina" Date: Wed, 5 Jun 2024 17:50:59 +0300 Subject: [PATCH] Added read status to obj Signed-off-by: m.malygina --- scenarios/s3.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/scenarios/s3.js b/scenarios/s3.js index d0bbdd3..22b031a 100644 --- a/scenarios/s3.js +++ b/scenarios/s3.js @@ -25,8 +25,6 @@ const read_size = JSON.parse(open(__ENV.PREGEN_JSON)).obj_size; const summary_json = __ENV.SUMMARY_JSON || '/tmp/summary.json'; const no_verify_ssl = __ENV.NO_VERIFY_SSL || 'true'; -const delete_after_read = __ENV.DELETE_AFTER_READ || 'true'; - const connection_args = { no_verify_ssl : no_verify_ssl } @@ -186,8 +184,6 @@ export function obj_read() { if (!resp.success) { log.withFields({bucket : obj.s3_bucket, key : obj.s3_key}) .error(resp.error); - } else if (delete_after_read) { - delete_object(obj) } return } @@ -197,8 +193,6 @@ export function obj_read() { const resp = s3_client.get(obj.bucket, obj.object); if (!resp.success) { log.withFields({bucket : obj.bucket, key : obj.object}).error(resp.error); - } else if (delete_after_read) { - delete_object(obj) } } @@ -208,10 +202,6 @@ export function obj_delete() { } const obj = obj_to_delete_selector.nextObject(); - delete_object(obj) -} - -export function delete_object(obj) { if (!obj) { if (obj_to_delete_exit_on_null) { exec.test.abort("No more objects to select"); @@ -224,12 +214,7 @@ export function delete_object(obj) { log.withFields({bucket : obj.s3_bucket, key : obj.s3_key, op : 'DELETE'}) .error(resp.error); return; - } else { - log.withFields({bucket : obj.s3_bucket, key : obj.s3_key}) - .info("deleted successfully"); } obj_registry.deleteObject(obj.id); } - -