xk6-frostfs/examples/s3local.js
Alexander Chuprov 978e1b891e
All checks were successful
DCO action / DCO (pull_request) Successful in 1m14s
Tests and linters / Check format (pull_request) Successful in 1m23s
Tests and linters / Tests (pull_request) Successful in 1m48s
Tests and linters / Tests with -race (pull_request) Successful in 2m4s
Tests and linters / Lint (pull_request) Successful in 3m22s
[#164] *.js: Fix formatting
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-11-15 19:07:24 +03:00

17 lines
505 B
JavaScript

import s3local from 'k6/x/frostfs/s3local';
import {uuidv4} from '../scenarios/libs/k6-utils-1.4.0.js';
const bucket = "testbucket"
const payload = open('../go.sum', 'b');
const s3local_cli = s3local.connect(
"path/to/storage/config.yml", "path/to/storage/config/dir", {}, {
'testbucket' : 'GBQDDUM1hdodXmiRHV57EUkFWJzuntsG8BG15wFSwam6',
});
export default function() {
const key = uuidv4();
if (s3local_cli.put(bucket, key, payload).success) {
s3local_cli.get(bucket, key)
}
}