Closed pmikolajczyk41 closed 6 months ago
I'll do my best to help debug. Can you fill in some more context though? What commands do you run to try this?
Here is what I tried so far.
$ git checkout roulette-tests
$ cd contracts/roulette
$ cargo test
Downloaded nalgebra-macros v0.2.1
Downloaded wide v0.7.11
...
Compiling drink v0.1.0
Compiling test-utils v0.1.0 (/home/joshy/ProgrammingProjects/Academy-PoW/contracts/test-utils)
Finished test [unoptimized + debuginfo] target(s) in 1m 44s
Running unittests lib.rs (target/debug/deps/roulette-96dd47a16e3c4042)
running 1 test
test roulette::tests::initialization ... FAILED
failures:
---- roulette::tests::initialization stdout ----
thread 'roulette::tests::initialization' panicked at 'Failed to load contract metadata: Failed to open metadata file target/ink/roulette.json
Caused by:
No such file or directory (os error 2)', /home/joshy/ProgrammingProjects/Academy-PoW/contracts/test-utils/lib.rs:24:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
roulette::tests::initialization
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
error: test failed, to rerun pass `--lib`
So I do see the test failing, but it seems to be because the test util can't find the contract metadata for me. I don't see anything about OutputBufferTooSmall
yet.
unfortunately, drink tests are rather context-specific, i.e. you have to run them from the directory containing sources... so what should be done is:
cd contracts/roulette
cargo contract build --release
cargo test --release
Closing this because we will not be running contracts on the PoW network this time.
I'm getting
OutputBufferTooSmall
during contract deployment... I'm building inrelease
mode, runtime used in drink is very similar to the one used in PoW node