solana icon indicating copy to clipboard operation
solana copied to clipboard

rpc: add tests for simulate transaction inner instructions

Open buffalojoec opened this issue 1 year ago β€’ 5 comments

Problem

As of #34313, inner instructions can now optionally be included in the RPC response for simulateTransaction. However, the test coverage on this new feature is lacking.

Summary of Changes

Added some tests specifically for the innerInstructions on the RPC's simulateTransaction method.

buffalojoec avatar Dec 16 '23 21:12 buffalojoec

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a5c470d) 81.7% compared to head (8ec37ad) 81.7%. Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #34495    +/-   ##
========================================
  Coverage    81.7%    81.7%            
========================================
  Files         826      826            
  Lines      223413   223458    +45     
========================================
+ Hits       182614   182721   +107     
+ Misses      40799    40737    -62     

codecov[bot] avatar Dec 16 '23 23:12 codecov[bot]

Ah nuts, I think some recent Bank changes nuked this test setup.

buffalojoec avatar Jan 03 '24 20:01 buffalojoec

This should be ready for another look @CriesofCarrots.

Is there a way to trigger CI manually for PRs? I think the "clippy on MacOS" job hiccuped, but I seem to be compliant here.

I can push a rebase sometime in the future as well to trigger if need be.

buffalojoec avatar Jan 05 '24 18:01 buffalojoec

So excited for this! If you get a chance to add this to the docs too… 🀌🏻

https://github.com/solana-foundation/developer-content/issues/46

steveluscher avatar Jan 20 '24 04:01 steveluscher

I rewrote this to use built-in program instructions to avoid the added dependencies and setup stuff. Much cleaner now.

If we want coverage on the token program instructions, etc. We'll have to consider adding program-test or at least the .so files of the SPL programs we want to test.

buffalojoec avatar Jan 21 '24 04:01 buffalojoec

And yes, please update the JSON-RPC docs! πŸ™ (I know I'm going to have a hard time remembering to update them now that they're out of this repo. Hopefully we can help each other :))

CriesofCarrots avatar Jan 22 '24 21:01 CriesofCarrots

And yes, please update the JSON-RPC docs! πŸ™ (I know I'm going to have a hard time remembering to update them now that they're out of this repo. Hopefully we can help each other :))

I put it on my list!

buffalojoec avatar Jan 22 '24 21:01 buffalojoec