xk6-frostfs/examples/local.js
Alexander Chuprov 978e1b891e
[#164] *.js: Fix formatting
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-11-15 19:07:24 +03:00

28 lines
650 B
JavaScript

import local from 'k6/x/frostfs/local';
import {uuidv4} from '../scenarios/libs/k6-utils-1.4.0.js';
const payload = open('../go.sum', 'b');
const local_cli =
local.connect("/path/to/config.yaml", "/path/to/config/dir", "", false)
export const options = {
stages : [
{duration : '30s', target : 10},
],
};
export default function() {
let headers = {
'unique_header' : uuidv4()
}
const container_id = '6BVPPXQewRJ6J5EYmAPLczXxNocS7ikyF7amS2esWQnb';
let resp = local_cli.put(container_id, headers, payload)
if (resp.success) {
local_cli.get(container_id, resp.object_id)
}
else {
console.log(resp.error)
}
}