2023-03-31 10:30:33 +00:00
|
|
|
import s3local from 'k6/x/frostfs/s3local';
|
2023-04-13 13:31:54 +00:00
|
|
|
import { uuidv4 } from '../scenarios/libs/k6-utils-1.4.0.js';
|
2023-03-31 10:30:33 +00:00
|
|
|
|
|
|
|
const bucket = "testbucket"
|
|
|
|
const payload = open('../go.sum', 'b');
|
2023-10-23 15:55:07 +00:00
|
|
|
const s3local_cli = s3local.connect("path/to/storage/config.yml", "path/to/storage/config/dir", {}, {
|
2023-03-31 10:30:33 +00:00
|
|
|
'testbucket': 'GBQDDUM1hdodXmiRHV57EUkFWJzuntsG8BG15wFSwam6',
|
|
|
|
});
|
|
|
|
|
|
|
|
export default function () {
|
|
|
|
const key = uuidv4();
|
|
|
|
if (s3local_cli.put(bucket, key, payload).success) {
|
|
|
|
s3local_cli.get(bucket, key)
|
|
|
|
}
|
|
|
|
}
|