draffle-io / draffle

dRaffle is a decentralized raffle protocol on Solana
83 stars 82 forks source link

Solana program test doesn't seem to work #19

Closed td-bn closed 2 years ago

td-bn commented 2 years ago

I wonder if its just me, but cargo test doesn't work for me. It stops working at the CreateRegistry CPI:

...
[2022-07-08T09:15:40.350697000Z DEBUG solana_runtime::message_processor::stable_log] Program B2jCF3V3hCCPcwsXPtjMhXVjzafXU68EMJWz3eKZ2kVa invoke [1]
[2022-07-08T09:15:40.350787000Z DEBUG solana_runtime::message_processor::stable_log] Program log: Instruction: CreateRegistry
[2022-07-08T09:15:40.350837000Z DEBUG solana_runtime::message_processor::stable_log] Program 11111111111111111111111111111111 invoke [1]
test test_dispenser has been running for over 60 seconds
test test_dispenser ... FAILED

failures:

---- test_dispenser stdout ----
C3qRytHov6rd1pVKVnqW8c4TK2JsYHzvvjgLxJSv37KF
uMey2wxeKvHkgDupBrg4u6cXz1sKhvjTKMk5RdMKvjF
thread 'solana-bank-forks-client' panicked at 'called `Result::unwrap()` on an `Err` value: MissingAccount'

Does this work for everyone else? Any idea what could be going wrong? I just cloned and ran the tests, without changing anything.

gabrielhicks commented 2 years ago

Hey! Im not exactly sure what it is you are testing, however, I just ran cargo test-bpf and passed everything successfully.

td-bn commented 2 years ago

Yeah, it seems it works fine. I was just running cargo test. Closing. Thanks for the quick reply @gabrielhicks