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 11:37:47 UTC

[GitHub] [camel-k] Abirdcfly opened a new pull request #2561: fix TestPermissionDenied should use assert.Nil

Abirdcfly opened a new pull request #2561:
URL: https://github.com/apache/camel-k/pull/2561


   <!-- Description -->
   
   TestPermissionDenied should use assert.Nil.
   This confused the homebrew guys  https://github.com/Homebrew/homebrew-core/pull/81904#issuecomment-887577465
   😂
   
   
   <!--
   Enter your extended release note in the below block. If the PR requires
   additional action from users switching to the new release, include the string
   "action required". If no release note is required, write "NONE". 
   
   You can (optionally) mark this PR with labels "kind/bug" or "kind/feature" to make sure
   the text is added to the right section of the release notes. 
   -->
   
   **Release Note**
   ```release-note
   NONE
   ```
   


-- 
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



[GitHub] [camel-k] squakez commented on pull request #2561: fix TestPermissionDenied should use assert.Nil

Posted by GitBox <gi...@apache.org>.
squakez commented on pull request #2561:
URL: https://github.com/apache/camel-k/pull/2561#issuecomment-896015636


   > Originally i opened that PR. But in the end they were arguing on thing i didn't see on our repo..
   
   Yeah, I think the problem is caused by how the CI is building the application. The best approach is indeed to work on improving the test in order to make it OS agnostic by creating a file and setting some privilege to deny access. I created it some time ago and I did not consider the impact on other systems that can build the application.
   
   I am opening a follow up issue to work on such improvement, in the while, we may even remove/comment the test in order to fix the problem described there.


-- 
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



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

Posted by GitBox <gi...@apache.org>.
Abirdcfly commented on pull request #2561:
URL: https://github.com/apache/camel-k/pull/2561#issuecomment-896073193


   > 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
   ```


-- 
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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [camel-k] oscerd commented on pull request #2561: fix TestPermissionDenied should use assert.Nil

Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #2561:
URL: https://github.com/apache/camel-k/pull/2561#issuecomment-896011453


   Originally i opened that PR. But in the end they were arguing on thing i didn't see on our repo..


-- 
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



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

Posted by GitBox <gi...@apache.org>.
squakez merged pull request #2561:
URL: https://github.com/apache/camel-k/pull/2561


   


-- 
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