From 5f2e95cdc3f252087579437caafbfe3376e85fe6 Mon Sep 17 00:00:00 2001 From: Bruno Fernandes Date: Tue, 7 Nov 2023 16:03:39 -0300 Subject: [PATCH] fix: add rclone test on index-s3 --- src/k6/index-s3.js | 16 ++++++++++++++++ src/k6/rclone-s3.js | 1 + 2 files changed, 17 insertions(+) diff --git a/src/k6/index-s3.js b/src/k6/index-s3.js index 876fd1e..f18fbe4 100644 --- a/src/k6/index-s3.js +++ b/src/k6/index-s3.js @@ -31,6 +31,11 @@ import { setup as mgcSetup, teardown as mgcTeardown } from "./mgc-s3.js"; +import { + default as rcloneTest, + setup as rcloneSetup, + teardown as rcloneTeardown +} from "./rclone-s3.js"; // init stage // XXX: due to k6 this is the aggregated copy/paste of each init stage @@ -64,6 +69,9 @@ export function setup() { describe("Setup mgc test", (_t) => { setupData.mgcData = mgcSetup(); }); + describe("Setup rclone test", (_t) => { + setupData.rcloneData = rcloneSetup(); + }); return setupData; } export default function ({ @@ -73,6 +81,7 @@ export default function ({ awsCliPresignData, boto3Data, mgcData, + rcloneData, }) { describe("Run k6-jslib-aws buckets test", async (_t) => { await k6JsLibBucketsTest(k6JsLibBucketsData); @@ -92,6 +101,9 @@ export default function ({ describe("Run mgc-s3 test", (_t) => { mgcTest(mgcData); }); + describe("Run rclone-s3 test", (_t) => { + rcloneTest(rcloneData); + }); } export function teardown({ @@ -101,6 +113,7 @@ export function teardown({ awsCliPresignData, boto3Data, mgcData, + rcloneData, }) { describe("Teardown k6-jslib-aws objects test", (_t) => { k6JsLibObjectsTeardown(k6JsLibObjectsData); @@ -120,4 +133,7 @@ export function teardown({ describe("Teardown mgc-s3 test", (_t) => { mgcTeardown(mgcData); }); + describe("Teardown rclone-s3 test", (_t) => { + mgcTeardown(rcloneData); + }); } diff --git a/src/k6/rclone-s3.js b/src/k6/rclone-s3.js index 15521e6..4c0adc3 100644 --- a/src/k6/rclone-s3.js +++ b/src/k6/rclone-s3.js @@ -16,6 +16,7 @@ const largeFileName = "k6" export function setup(){ return bucketSetup(rcloneConfig); } +export function teardown(){}; export default function scenarios (data){ uploadObject(data)