Run unit tests that require root perms in CI#1875
Conversation
Signed-off-by: David Son <davbson@amazon.com>
1081c34 to
8d13c20
Compare
|
Been testing with Two issues here:
What bothers me is that stargz runs this exact test but it does not fail. I attempted to run it locally and it did fail there as well. Wonder if there's some setup we're missing here... In any case, it's an option to skip the test entirely if it's causing so much trouble. But I would like to figure it out if possible. |
d6997ff to
06b4f83
Compare
|
I found the culprit. Our CodeBuild runners are on 4.14 which is causing issues with mounting. Newest Ubuntu runners are using 6.14 which doesn't have these issues. We still have issues on CodeBuild with cross-device linking as well which I haven't figured out the reason for, but CI on regular GitHub Ubuntu runners seems to pass. As a bandaid solution, I'll create a separate workflow that only runs root tests on an Ubuntu runner. I'll create an issue to track this as well. |
3709e8c to
ded6eb3
Compare
Signed-off-by: David Son <davbson@amazon.com>
ded6eb3 to
17ef2bb
Compare
Issue #, if available:
Closes #892
Description of changes:
Added the necessary flags to the Makefile to pass
-test.rootto the testing binaries. We can't just useGO_TEST_ARGSas passing-test.rootthere will cause an unrecognized flag error in all of our other packages, as only the snapshot package uses the-test.rootflag, so passing it to the test binary allows all the other tests to just ignore it.Really I don't think we should be using containerd's
testutil.RequiresRootat all. But this is a decent bandaid fix.This also added a separate commit to fix our failing remote tests as we did not have a namespace attached to the contexts passed in which would cause them to fail.
Testing performed:
GO_TEST_BINARY_FLAGS='-test.root'make test failed locally but seems like issues with my local setup. Opening as draft to see if runners will have the same issue. If not, will take out of draft state.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.