anchor icon indicating copy to clipboard operation
anchor copied to clipboard

cli: anchor test does not properly use `--provider.cluster` option

Open paul-schaaf opened this issue 3 years ago • 4 comments

If I set the provider.cluster property in Anchor.toml to devnet my tests work.

If I set it to localnet but use anchor test --provider.cluster=devnet, my tests should also work but they dont

  2) tic-tac-toe
       player one wins:
     Error: failed to send transaction: Transaction simulation failed: This program may not be used for executing instructions

paul-schaaf avatar Jan 10 '22 23:01 paul-schaaf

Does this work for you?

anchor test --provider.cluster devnet

nasmithan avatar Jan 12 '22 00:01 nasmithan

Having exactly the same issue. https://github.com/project-serum/anchor/issues/1294#issuecomment-1010496978 doesn't work.

Logarithmus avatar Feb 02 '22 12:02 Logarithmus

I have the same issue too.

sigridjineth avatar Feb 27 '22 03:02 sigridjineth

Me too. Hope to get know the reason.

toniandsol avatar Aug 18 '22 05:08 toniandsol

Same issue too.

coldnight avatar Dec 24 '22 08:12 coldnight

Reinstall the latest stable Solana CLI solve this problem: https://docs.solana.com/getstarted/local#install-the-solana-cli

coldnight avatar Dec 24 '22 08:12 coldnight

It sounds like this might be fixed then?

Henry-E avatar Dec 26 '22 15:12 Henry-E