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

Streamline test setup #14

Merged
merged 1 commit into from
Aug 19, 2022
Merged

Streamline test setup #14

merged 1 commit into from
Aug 19, 2022

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Aug 19, 2022

This is an optional PR, checking to see what folks think.

This PR reduces the boilerplate code with test setup. It uses Go test's TempDir method to make temp directories. These are automatically cleaned up, so we don't have to deal with defer and clean up methods. The PR also stores the test object, so it's not necessary to pass around via method arguments.

Signed-off-by: Daniel Mikusa dmikusa@vmware.com

This is an optional PR, checking to see what folks think.

This PR reduces the boilerplate code with test setup. It uses Go test's `TempDir` method to make temp directories. These are automatically cleaned up, so we don't have to deal with defer and clean up methods. The PR also stores the test object, so it's not necessary to pass around via method arguments.

Signed-off-by: Daniel Mikusa <dmikusa@vmware.com>
@dmikusa dmikusa added type:task A general task semver:patch A change requiring a patch version bump labels Aug 19, 2022
@dmikusa dmikusa requested a review from a team as a code owner August 19, 2022 18:18
@dmikusa dmikusa merged commit 822860f into main Aug 19, 2022
@dmikusa dmikusa deleted the test-api-changes branch August 19, 2022 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants