AztecProtocol / noir-starter

MIT License
168 stars 40 forks source link

Foundry starter tests failing because of file permissions on MacOS #74

Closed orpheuslummis closed 8 months ago

orpheuslummis commented 8 months ago

Aim

forge test --optimize --optimizer-runs 5000 --evm-version london with noir + foundry starter

Expected Behavior

Tests to work.

Bug

o@mm my-noir-app % forge test --optimize --optimizer-runs 5000 --evm-version london
[⠒] Compiling...
No files changed, compilation skipped

Running 5 tests for test/Starter.t.sol:StarterTest
[PASS] testVerifyProof() (gas: 425716)
[FAIL. Reason: the path /tmp/test1/Prover.toml is not allowed to be accessed for write operations] test_dynamicProof() (gas: 34171)
[FAIL. Reason: the path /tmp/test2/Prover.toml is not allowed to be accessed for write operations] test_dynamicProofSecondTest() (gas: 34191)
[FAIL. Reason: the path /tmp/test3/Prover.toml is not allowed to be accessed for write operations] test_dynamicProofThirdTest() (gas: 34191)
[PASS] test_wrongProof() (gas: 425840)
Test result: FAILED. 2 passed; 3 failed; 0 skipped; finished in 19.30ms

To Reproduce

  1. create noir starter with foundry
  2. forge test --optimize --optimizer-runs 5000 --evm-version london

Environment

MacOS

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

orpheuslummis commented 8 months ago

Note that I tried to add chmod -R u+w,g+w,o+w /tmp/$1 to the createFile.sh script but it didn't fix it.

critesjosh commented 8 months ago

This might be something specific to your machine. I just ran through the example on a new machine and it's working for me. Maybe it has to do with how you installed forge?

orpheuslummis commented 8 months ago

Indeed. I re-installed Foundry and now it works... Closing. Thanks!