xk6-frostfs/examples/s3local.js
Alexander Chuprov 6adc201c2c
All checks were successful
DCO action / DCO (pull_request) Successful in 1m15s
Tests and linters / Check clang-format (pull_request) Successful in 1m25s
Tests and linters / Tests (pull_request) Successful in 1m46s
Tests and linters / Tests with -race (pull_request) Successful in 2m22s
Tests and linters / Lint (pull_request) Successful in 3m9s
[#164] *.js: Fix formatting
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-11-06 16:32:50 +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)
}
}