Arisu 0x1bf52
Arisu 0x1bf52
CDCloudflare Developers
Created by Arisu 0x1bf52 on 3/16/2024 in #workers-help
How can I make miniflare persit R2 data on local in testing?
I have a worker and it need to access R2. I want to run test locally and make R2 load files from local dir. are there any options I can add here?
export default defineWorkersConfig({
test: {
poolOptions: {
workers: {
wrangler: { configPath: './wrangler.toml' },
miniflare: {
r2Buckets: {
MY_BUCKET: 'sing-box-config',
// 'sing-box-config': 'MY_BUCKET',
},
},
},
},
},
});
export default defineWorkersConfig({
test: {
poolOptions: {
workers: {
wrangler: { configPath: './wrangler.toml' },
miniflare: {
r2Buckets: {
MY_BUCKET: 'sing-box-config',
// 'sing-box-config': 'MY_BUCKET',
},
},
},
},
},
});
4 replies