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

Fix up job object options for unit tests #1335

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

dcantah
Copy link
Contributor

@dcantah dcantah commented Mar 21, 2022

Most of the jobobject package tests we have ask for options that aren't actually needed/used. This change makes it so that any test that doesn't need a named job object doesn't ask for one and any test that doesn't plan on using the iocp messages doesn't flip the notifications field either. This wasn't causing any issues, but it's probably best to filter down what's being tested to only what's needed.

@dcantah dcantah requested a review from a team as a code owner March 21, 2022 19:30
internal/exec/exec_test.go Outdated Show resolved Hide resolved
Most of the `jobobject` package tests we have ask for options that aren't
actually needed/used. This change makes it so that any test that doesn't need
a named job object doesn't ask for one and any test that doesn't plan on
using the iocp messages doesn't flip the notifications field either. This
wasn't causing any issues, but it's probably best to filter down what's
being tested to only what's needed.

Additionally fixes TestExecsWithJob that used log.Fatal instead of t.Fatal
in the test.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
@dcantah
Copy link
Contributor Author

dcantah commented Mar 24, 2022

Re-pushing as the CI was stuck on reporting status and re-running didn't seem to do anything..

@dcantah dcantah merged commit 93505d7 into microsoft:master Mar 24, 2022
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
Most of the `jobobject` package tests we have ask for options that aren't
actually needed/used. This change makes it so that any test that doesn't need
a named job object doesn't ask for one and any test that doesn't plan on
using the iocp messages doesn't flip the notifications field either. This
wasn't causing any issues, but it's probably best to filter down what's
being tested to only what's needed.

Additionally fixes TestExecsWithJob that used log.Fatal instead of t.Fatal
in the test.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
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.

3 participants