Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support upgradeable-program in 'anchor test' #2641

Closed
nickguo opened this issue Sep 29, 2023 · 1 comment
Closed

Support upgradeable-program in 'anchor test' #2641

nickguo opened this issue Sep 29, 2023 · 1 comment
Labels

Comments

@nickguo
Copy link
Contributor

nickguo commented Sep 29, 2023

Hello, I have a self-motivated feature request to add support for --upgradeable-program to anchor test.

In my project, I'd like to test that certain instructions can only be executed by the program's upgrade authority. However, after poking around anchor test, I see that we always deploy the program with --bpf-program, so the upgrade authority is not available. https://github.com/coral-xyz/anchor/blob/master/cli/src/lib.rs#L3039

This led me to create a separate test script in order to unblock myself. In the long term, I would love to delete my test script and use built-in anchor test features instead.

Proposal

Add a boolean flag to anchor test to toggle deploying target program as upgradeable. Something like anchor test --test_upgradeable_program. The default behavior is still to use --bpf-program, unchanged from today.

If no objections, I'm happy to quickly proceed with a PR

nickguo added a commit to nickguo/anchor that referenced this issue Sep 29, 2023
@nickguo
Copy link
Contributor Author

nickguo commented Sep 29, 2023

Change drafted here #2642

nickguo added a commit to nickguo/anchor that referenced this issue Sep 29, 2023
nickguo added a commit to nickguo/anchor that referenced this issue Sep 29, 2023
nickguo added a commit to nickguo/anchor that referenced this issue Sep 29, 2023
nickguo added a commit to nickguo/anchor that referenced this issue Oct 2, 2023
nickguo added a commit to nickguo/anchor that referenced this issue Oct 2, 2023
nickguo added a commit to nickguo/anchor that referenced this issue Oct 2, 2023
nickguo added a commit to nickguo/anchor that referenced this issue Oct 2, 2023
nickguo added a commit to nickguo/anchor that referenced this issue Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants