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

Add unit tests and mocks to stdio_utils and rework workceptor tests to use table driven testing #813

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

AaronH88
Copy link
Contributor

@AaronH88 AaronH88 commented Aug 4, 2023

Created interfaces and a wrapper for os and io functionality.
Mocked os and io functionality so that no file is created or read during testing.
Exposed the constructor for NewStdinReader and NewStdinWriter,
Created Set methods for the reader and writer to create injection points for our mocks.
Refactored the rest of the codebase to use the exported constructor and os/io wrapper (FileSystem).

@AaronH88 AaronH88 force-pushed the stdis_utils_tests branch 3 times, most recently from ccec2e5 to f2f0b1b Compare August 8, 2023 10:58
@AaronH88 AaronH88 requested a review from shanemcd August 8, 2023 11:39
@AaronH88 AaronH88 force-pushed the stdis_utils_tests branch 4 times, most recently from d029421 to 2188c43 Compare August 16, 2023 10:54
@sonarcloud
Copy link

sonarcloud bot commented Aug 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@AaronH88 AaronH88 merged commit 1f265c2 into ansible:devel Aug 28, 2023
11 checks passed
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.

1 participant