Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing migration tests make other tests fail due to ProviderError #283

Open
cameel opened this issue Nov 25, 2021 · 0 comments
Open

Failing migration tests make other tests fail due to ProviderError #283

cameel opened this issue Nov 25, 2021 · 0 comments

Comments

@cameel
Copy link

cameel commented Nov 25, 2021

When I try to run trident tests locally, Migration.test.ts always fails. Tests only pass if I explicitly

git clone https://github.com/sushiswap/trident
cd trident/
yarn install
yarn build
yarn test
...

  42 passing (2m)
  2 pending
  38 failing

  1) Migration
       "before all" hook for "Should prepare for migration in chef":
     ProviderError: Must be authenticated!
      at HttpProvider.request (node_modules/hardhat/src/internal/core/providers/http.ts:49:19)
      at getNetworkId (node_modules/hardhat/src/internal/hardhat-network/provider/utils/makeForkClient.ts:109:43)
      at Object.makeForkClient (node_modules/hardhat/src/internal/hardhat-network/provider/utils/makeForkClient.ts:40:27)
      at Function.create (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:153:15)
      at HardhatNetworkProvider._init (node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:234:46)
      at async HardhatNetworkProvider._reset (node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:327:5)
      at async HardhatModule._resetAction (node_modules/hardhat/src/internal/hardhat-network/provider/modules/hardhat.ts:206:5)
      at async HardhatNetworkProvider.request (node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:108:18)
      at async Context.<anonymous> (test/Migration.test.ts:11:5)

...

The weird thing is it's only only the tests in test/Migration.test.ts that fail but once they do, every test after them fails with the same message. For example TridentMath:

TS_NODE_TRANSPILE_ONLY=1 npx hardhat test test/Migration.test.ts test/TridentMath.test.ts
  3) TridentMath
       "before all" hook for "TridentMath.sqrt() returns correct values":
     ProviderError: Must be authenticated!

If your run tests for TridentMath only, they succeed:

TS_NODE_TRANSPILE_ONLY=1 npx hardhat test test/TridentMath.test.ts
  TridentMath
    ✓ TridentMath.sqrt() returns correct values (196ms)


  1 passing (2s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant