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

feat(pops): Refactor Challenger for Testability #5624

Merged
merged 2 commits into from
May 7, 2023

Conversation

refcell
Copy link
Contributor

@refcell refcell commented May 5, 2023

Description

Cleans up the op-challenger to follow the op-program's format so we can test cli args easily.

NOTE: challenger/utils.go will be removed in #5622 :)

@refcell refcell self-assigned this May 5, 2023
@changeset-bot
Copy link

changeset-bot bot commented May 5, 2023

⚠️ No Changeset found

Latest commit: 666f490

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented May 5, 2023

Deploy Preview for opstack-docs canceled.

Name Link
🔨 Latest commit 666f490
🔍 Latest deploy log https://app.netlify.com/sites/opstack-docs/deploys/64581719ce5d320008638784

@mergify
Copy link
Contributor

mergify bot commented May 5, 2023

Hey @refcell! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label May 5, 2023
@mergify mergify bot removed the conflict label May 5, 2023
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM.

Worth noting that the CheckRequired method in flags.go isn't being called now. The config checks pick it up but the error message they give is slightly less useful because it doesn't include the specific CLI option name that's missing (ie you get missing l1 eth rpc urlinstead of flag --l1-eth-rpc is required).

I suggest hooking that back up in the next PR and adding tests for the CLI flags to cover it. You do get a bit of duplication between the config tests and flag tests but they're quite simple tests and cli vs config are their own separate concerns so worth testing individually. Plus the CLI tests cover the actual parsing which can provide some surprises at times.

@mergify
Copy link
Contributor

mergify bot commented May 7, 2023

This PR has been added to the merge queue, and will be merged soon.

@mergify
Copy link
Contributor

mergify bot commented May 7, 2023

This PR is next in line to be merged, and will be merged as soon as checks pass.

@mergify
Copy link
Contributor

mergify bot commented May 7, 2023

This PR is next in line to be merged, and will be merged as soon as checks pass.

@OptimismBot OptimismBot merged commit f717c43 into develop May 7, 2023
8 of 9 checks passed
@OptimismBot OptimismBot deleted the pops/test/challenger branch May 7, 2023 21:40
@mergify mergify bot removed the on-merge-train label May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants