ansh0014 commented on code in PR #6886:
URL: https://github.com/apache/camel-k/pull/6886#discussion_r4290458536


##########
pkg/cmd/source/util_test.go:
##########
@@ -42,34 +43,45 @@ func isWindows() bool {
        return runtime.GOOS == "windows"
 }
 
-func TestPermissionDenied(t *testing.T) {
-
+func denyAccess(t *testing.T, dir string) func() {
+       t.Helper()
        if isWindows() {
-               t.Skip("Test not reliably producing a result on a windows OS")
+               out, err := exec.Command("icacls", dir, "/deny", 
"*S-1-1-0:(OI)(CI)(F)").CombinedOutput()

Review Comment:
   Okay, I understand your feedback. I'll review the approach and look for a 
solution that keeps the unit tests pure Go without using external OS commands. 
I'll update you shortly with my revised approach. Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to