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

[github] add default derive for MinimalRepository and WorkflowRun #47

Conversation

chantra
Copy link
Contributor

@chantra chantra commented Jan 31, 2023

When instanciating those in test, the number of fields that needs to be declared is overwhelming. When dealing with test cases, in many cases, only a few fields really matter and having something to populate defaults avoid lots of boiler plate.

@chantra
Copy link
Contributor Author

chantra commented Feb 6, 2023

@augustuswm do you have any opinions on this?

@augustuswm
Copy link
Contributor

Yes, sorry for not following up on this. This makes sense to me. I'll try to get this merged and released early this week.

@chantra
Copy link
Contributor Author

chantra commented Feb 6, 2023

Thanks for the quick reply. Let me actually update it with another struct I would have otherwise have to wrap.
I have yet to look into the mock crate, but I wonder if it would make sense to wrap the generated structures with automock?

…heckAnnotation

When instanciating those in test, the number of fields that needs to be
declared is overwhelming. When dealing with test cases, in many cases,
only a few fields really matter and having something to populate
defaults avoid lots of boiler plate.
@chantra chantra force-pushed the default_workflowrun_minimalrepo_struct branch from 056ce88 to 4605f03 Compare February 6, 2023 18:55
@augustuswm
Copy link
Contributor

I'm good with merging these additions. Let me know if you have all of the needed types covered. I'll see if we can have a better way of doing this then listing all of the types.

@chantra
Copy link
Contributor Author

chantra commented Feb 8, 2023

Yes, I should be good for now. Thanks for checking @augustuswm .

@augustuswm augustuswm merged commit 099b694 into oxidecomputer:main Feb 8, 2023
kavin-kr pushed a commit to kavin-kr/third-party-api-clients that referenced this pull request Mar 28, 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.

2 participants