Skip to content

Move avm.newContext to snowtest.Context #2513

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

Merged
merged 54 commits into from
Dec 21, 2023
Merged

Move avm.newContext to snowtest.Context #2513

merged 54 commits into from
Dec 21, 2023

Conversation

dhrubabasu
Copy link
Contributor

@dhrubabasu dhrubabasu commented Dec 19, 2023

Why this should be merged

Removes all one-off test helpers in the avm to use a new snowtest.Context helper.

How this works

create + replace

How this was tested

CI

@dhrubabasu dhrubabasu added testing This primarily focuses on testing cleanup Code quality improvement labels Dec 19, 2023
@dhrubabasu dhrubabasu added this to the v1.10.18 milestone Dec 19, 2023
@dhrubabasu dhrubabasu self-assigned this Dec 19, 2023
@dhrubabasu dhrubabasu changed the title Create snowtest.NewContext helper Move avm.newContext to snowtest.NewContext Dec 19, 2023
Copy link
Contributor

@abi87 abi87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd modify snowtest.Context constructor to specify the target chain, instead of fixing it ex-psto via ctx.ChainID = ctx.XChainID.
We are already not doing it for all the UTs and it may become harder to maintain if we ever change context attributes relationships.
I think ideally snowtest.Context should fully format the context and tests should just read from it

@dhrubabasu dhrubabasu requested a review from abi87 December 20, 2023 16:44
Base automatically changed from avm-service-tests to dev December 20, 2023 22:06
@StephenButtolph StephenButtolph added this pull request to the merge queue Dec 21, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 21, 2023
@StephenButtolph StephenButtolph merged commit d5bbe8d into dev Dec 21, 2023
@StephenButtolph StephenButtolph deleted the snowtest branch December 21, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code quality improvement testing This primarily focuses on testing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants