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

Refactor test runner steps to be more reusable #143

Open
bifurcation opened this issue Mar 15, 2023 · 1 comment
Open

Refactor test runner steps to be more reusable #143

bifurcation opened this issue Mar 15, 2023 · 1 comment

Comments

@bifurcation
Copy link
Collaborator

Right now, all the interesting logic in test-runner.go is in one big switch statement in RunStep. This makes it basically impossible for compound steps to call through to individual steps. For example, fullCommit could in principle call through to commit, handlePendingCommit, handleCommit, and joinGroup, but instead it replicates all the logic of those methods.

@bifurcation
Copy link
Collaborator Author

One thing that might be helpful here is to leverage the Go type system more, for example by decoding script steps into typed values. Then you could have a bunch of RunFooStep(step FooStep) methods that would presumably be easier to chain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant