rancher / system-agent

Apache License 2.0
21 stars 43 forks source link

Update Windows Files #197

Closed HarrisonWAffel closed 3 weeks ago

HarrisonWAffel commented 1 month ago

This PR closes the gap between how files are created on Linux and Windows. It also adds unit tests around file permissions, as well as updates CI to run these tests on both Linux and Windows.

Note: This unit test does not compile properly on arm, and I can't determine why. Testing the CI on my fork repeatedly resulted in the below error. Because of this, I added a build tag to exclude this unit test on arm. I'm not aware of any differences between file creation and permissions between the two architectures, but if we feel strongly about including this test on arm I can continue to look into the error. But ultimately, for linux, this unit test is covering functionality was added to this repo ~3 years ago.

fork/exec /tmp/go-build3394345592/b1239/applyinator.test: exec format error
FAIL    github.com/rancher/system-agent/pkg/applyinator 0.002s