From bf799efdee31e8725beb03fdd160776609d745e9 Mon Sep 17 00:00:00 2001 From: Ondra Chaloupka Date: Tue, 19 Dec 2023 11:22:10 +0100 Subject: [PATCH] fix on Dockerfile to not print bigint-buffer errors --- .github/docker/Dockerfile | 2 +- test/setup/globalSetup.ts | 28 ---------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/.github/docker/Dockerfile b/.github/docker/Dockerfile index 6d56edf..b558469 100644 --- a/.github/docker/Dockerfile +++ b/.github/docker/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:latest AS builder RUN apt-get update && \ - apt-get install -y curl cargo pkg-config build-essential libudev-dev + apt-get install -y curl cargo pkg-config build-essential libudev-dev python3 RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y diff --git a/test/setup/globalSetup.ts b/test/setup/globalSetup.ts index efda758..e8ebbba 100644 --- a/test/setup/globalSetup.ts +++ b/test/setup/globalSetup.ts @@ -17,34 +17,6 @@ export default async (): Promise => { const votePubkey = await TestWorld.getSolanaTestValidatorVoteAccountPubkey() // --- CREATING STAKE ACCOUNT and DELEGATE --- - // create a stake account that will be used later in all tests - const tx = new Transaction() - const ixStakeAccount = StakeProgram.createAccount({ - authorized: { - staker: TestWorld.PROVIDER.wallet.publicKey, - withdrawer: TestWorld.PROVIDER.wallet.publicKey, - }, - fromPubkey: TestWorld.PROVIDER.wallet.publicKey, - lamports: 2 * LAMPORTS_PER_SOL, - stakePubkey: TestWorld.STAKE_ACCOUNT.publicKey, - }) - tx.add(ixStakeAccount) - /// delegating stake account to the vote account - const ixDelegate = StakeProgram.delegate({ - authorizedPubkey: TestWorld.PROVIDER.wallet.publicKey, - stakePubkey: TestWorld.STAKE_ACCOUNT.publicKey, - votePubkey, - }) - tx.add(ixDelegate) - await TestWorld.PROVIDER.sendAndConfirm(tx, [TestWorld.STAKE_ACCOUNT]) - - const stakeBalance = await TestWorld.CONNECTION.getBalance( - TestWorld.STAKE_ACCOUNT.publicKey - ) - await TestWorld.CONNECTION.getAccountInfo(TestWorld.STAKE_ACCOUNT.publicKey) - if (!stakeBalance) { - throw new Error('Jest global setup error: no stake account balance') - } await createAndDelegateStake(TestWorld.STAKE_ACCOUNT, votePubkey) await createAndDelegateStake(TestWorld.STAKE_ACCOUNT_TO_WITHDRAW, votePubkey)