Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
manolisliolios committed Apr 26, 2024
1 parent 86df39a commit a532e11
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sdk_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ jobs:
- name: Prepare local network & run SDK tests
run: |
./sui-test-validator --epoch-duration-ms 300000 > /dev/null 2>&1 & cd sdk && pnpm test:e2e
./sui-test-validator --epoch-duration-ms 300000 > /dev/null 2>&1 & cd sdk && VITE_SUI_BIN="../sui" pnpm test:e2e
2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"node": ">=16"
},
"dependencies": {
"@mysten/sui.js": "0.51.2"
"@mysten/sui.js": "0.52.0"
},
"devDependencies": {
"@types/node": "^20.11.19",
Expand Down
8 changes: 4 additions & 4 deletions sdk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions sdk/test/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ describe('Testing SuiNS SDK e2e', () => {
toolbox = await setupSuiClient();

// publish and setup these contracts and get back the constants (packageIds / objectIds).
// const constants = await retry(() => publishAndSetupSuinsContracts(toolbox), {
// backoff: 'EXPONENTIAL',
// // overall timeout in 2 minutes
// timeout: 1000 * 60 * 2,
// logger: (msg) => console.warn('Retrying publishing the contracts: ' + msg),
// });
const constants = await publishAndSetupSuinsContracts(toolbox)
const constants = await retry(() => publishAndSetupSuinsContracts(toolbox), {
backoff: 'EXPONENTIAL',
// overall timeout in 2 minutes
timeout: 1000 * 60 * 2,
logger: (msg) => console.warn('Retrying publishing the contracts: ' + msg),
});

suinsClient = new SuinsClient({
client: toolbox.client,
Expand Down
3 changes: 1 addition & 2 deletions sdk/test/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ export async function publishAndSetupSuinsContracts(
toolbox: TestToolbox,
): Promise<Constants> {
const folder = path.resolve(__dirname, './../../scripts');
const rootFolder = path.resolve(__dirname, './../../');

// publishes & sets-up the contracts on our localnet.
execSync(`cd ${folder} && pnpm publish-and-setup`, {

Check warning

Code scanning / CodeQL

Shell command built from environment values Medium test

This shell command depends on an uncontrolled
absolute path
.
env: {
...process.env,
PRIVATE_KEY: toolbox.keypair.getSecretKey(),
SUI_BINARY: rootFolder + '/sui',
SUI_BINARY: SUI_BIN,
NETWORK: 'localnet',
},
});
Expand Down

0 comments on commit a532e11

Please sign in to comment.