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: refactor action into a interface #29

Closed

Conversation

naveensrinivasan
Copy link
Member

Description

  • refactor the actionrunner and actioncfg into an interface to help create unit tests.

Related Issue

Fixes #

Relates to #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

- refactor the actionrunner and actioncfg into a interface to help
  create unit tests.

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
)

// ActionRunner defines the interface for running actions.
type ActionRunner interface {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the abstraction created by the interface doesn't quite make sense. I think we'll only ever have Zarf action runners implement this interface. Understood this makes mocking in unit tests a bit easier but I don't that's worth the extra abstraction.

@naveensrinivasan naveensrinivasan force-pushed the naveen/feat/refactor-zarf-deps-injection branch from d78f7dd to e1682ad Compare March 24, 2024 19:10
@naveensrinivasan
Copy link
Member Author

I think the abstraction created by the interface doesn't quite make sense. I think we'll only ever have Zarf action runners implement this interface. Understood this makes mocking in unit tests a bit easier but I don't that's worth the extra abstraction.

Closing this 👍

This pull request was closed.
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.

2 participants