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

run osq runtime tests on windows #1665

Merged

Conversation

James-Pickett
Copy link
Contributor

@James-Pickett James-Pickett commented Mar 29, 2024

This PR enables osq runtime tests on windows. When running the tests locally on windows, I've only been able to get them to work when running as administrator. I think that's okay?

Thera are a few tests added to runtime_posix_test.go that would not run or were flakey on windows.

I spent a few hours trying to figure out why the TestRestart test would not work consistently on windows, but I was stumped. If anybody has an ideas there, it would be great.

@James-Pickett James-Pickett changed the title post PR with notes on windows test issues run osq runtime tests on windows Mar 29, 2024
@James-Pickett James-Pickett marked this pull request as ready for review April 1, 2024 22:20
directionless
directionless previously approved these changes Apr 2, 2024
Copy link
Contributor

@directionless directionless left a comment

Choose a reason for hiding this comment

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

Nice refactor. I love bringing some of the tests into windows.

Comment on lines 31 to 32
// This this is only enabled on non-Windows platforms because suspending we have not yet
// figured out how to suspend a process on windows via golang.
Copy link
Contributor

Choose a reason for hiding this comment

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

(nit) grammar seems wrong. I think I know what you mean, but I'm not totally sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Comment on lines +3 to +4
// these tests have to be run as admin on windows

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth baking this into an if with a either an error or skip?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added it to the test main func, it just logs to stdout, the alternative was to added it to ever single test, which seemed tedious

Comment on lines +122 to +123
// This test causes time outs on windows, so it is only run on non-windows platforms.
// Should investigate why this is the case.
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this timeout is related to our prod issue, or unrelated. I think it's reasonable to refactor (as this PR does) and pick that up next PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

was thinking the same, merge this then try to dig into this test

@James-Pickett James-Pickett added this pull request to the merge queue Apr 2, 2024
Merged via the queue into kolide:main with commit 50e6be1 Apr 2, 2024
29 checks passed
@James-Pickett James-Pickett deleted the james/osq-runtime-tests-windows branch April 2, 2024 16:57
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.

None yet

2 participants