Skip to content

Commit

Permalink
added bucket name in credential
Browse files Browse the repository at this point in the history
  • Loading branch information
fukaoi committed Sep 4, 2024
1 parent 584a132 commit a2e0897
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/suite-storage/test/filebase.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import test from 'ava';
import { RandomAsset } from 'test-tools/setupAsset';
import { Filebase } from '../src/filebase';
import { Constants } from '~/suite-utils';
import { execSync } from 'child_process';

test('Upload file', async (t) => {
const asset = RandomAsset.get();
Expand Down Expand Up @@ -47,3 +49,22 @@ test('Remove objects in buckets', async (t) => {
},
);
});

test('Upload file with custom parameter', async (t) => {
execSync(
'pnpm solana-suite-config -f 9CA51CEFF9FF98CB91CF CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo firedancer',
);
const asset = RandomAsset.get();
const res = await Filebase.uploadFile(asset.filePath!);

res.match(
(ok) => {
t.pass();
t.log(`# filebase ipfs url: ${ok}`);
},
(err) => {
console.error(err);
t.fail(err.message);
},
);
});

0 comments on commit a2e0897

Please sign in to comment.