2022-12-29 14:52:55 +00:00
|
|
|
import native from 'k6/x/frostfs/native';
|
2023-04-13 13:31:54 +00:00
|
|
|
import { uuidv4 } from '../scenarios/libs/k6-utils-1.4.0.js';
|
2022-05-23 11:42:48 +00:00
|
|
|
|
|
|
|
const payload = open('../go.sum', 'b');
|
|
|
|
const container = "AjSxSNNXbJUDPqqKYm1VbFVDGCakbpUNH8aGjPmGAH3B"
|
2024-06-14 07:41:15 +00:00
|
|
|
const frostfs_cli = native.connect("s01.frostfs.devenv:8080", "", 0, 0, false, 0)
|
2022-12-29 14:52:55 +00:00
|
|
|
const frostfs_obj = frostfs_cli.onsite(container, payload)
|
2022-05-23 11:42:48 +00:00
|
|
|
|
|
|
|
export const options = {
|
|
|
|
stages: [
|
|
|
|
{ duration: '30s', target: 10 },
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
export default function () {
|
|
|
|
let headers = {
|
|
|
|
'unique_header': uuidv4()
|
|
|
|
}
|
2022-12-29 14:52:55 +00:00
|
|
|
let resp = frostfs_obj.put(headers)
|
2022-05-23 11:42:48 +00:00
|
|
|
if (resp.success) {
|
2022-12-29 14:52:55 +00:00
|
|
|
frostfs_cli.get(container, resp.object_id)
|
2022-05-23 11:42:48 +00:00
|
|
|
} else {
|
|
|
|
console.log(resp.error)
|
|
|
|
}
|
|
|
|
}
|