You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/08/10 14:37:58 UTC

[GitHub] [camel-k] squakez commented on pull request #2561: fix TestPermissionDenied should ignore darwin

squakez commented on pull request #2561:
URL: https://github.com/apache/camel-k/pull/2561#issuecomment-896085662


   > > We do expect an error there. More exactly a "permission denied" error as we are trying to access `/root` with no permission for it. We can work on refactoring the whole test and instead creating a real file with root permissions in another directory. The goal of the test is to fail (and not panic) with a permission denied error.
   > 
   > Yes, We do expect an error there. the true bug is that when run command `go test ./...` in darwin, we will get a error like
   > 
   > ```
   > --- FAIL: TestPermissionDenied (0.00s)
   >     util_test.go:41:
   >                 Error Trace:    util_test.go:41
   >                 Error:          Expected value not to be nil.
   >                 Test:           TestPermissionDenied
   > ```
   
   I guess that's because Darwin won't return an error when trying to access `/root/`. I am not entirely sure how the Golang library is behaving when it comes to cross os file managment. I think we can give a try and create a file, setting the permissions, as I suggested in #2563, instead of assuming `/root/` is privileged, as we're doing now.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org