-
Notifications
You must be signed in to change notification settings - Fork 43
#24 : Check that symlinks resources are preserved during git clone #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#24 : Check that symlinks resources are preserved during git clone #25
Conversation
I don't think this is the right way to solve it. I would prefer that the problematic symlinks are created before the unittest is executed, instead of checking the code out with extra flags. Should be possible, right? |
Modify I will update this PR like that if no objection. |
Sure, adjust it under |
Some mechanisms already exists for that in UT ( |
Finally, hard to deal without re-creating symlink completely. This scenario works:
With this matrix:
Ready for review if necessary. |
Thanks for putting effort in this issue, but sadly it still doesn't work on my machine. With the cmd (administrator):
cmd(default):
gitbash:
|
Grrr ... I will try to reproduce these errors (I'm admin of my machine ... I hope there is no tricky behavior with windows symlinks & permissions) ; but not available before this weekend :-(. Is the surefire XML gives some detail about FileSystem error ? (seems to be a problem with symlinks directory). |
Don't lose your time. I can reproduce the problem on Windows 10 (good news ^^). "User admin" privileges are not the same than Windows 7 (by default). But the root cause is a The client doesn't have enough privilege (translated from French, seems A required privilege is not held by the client in English) on
@rfscholte : About this error, I can reproduce when I have a wrapper script ( Thanks |
I'm using the official Maven distribution (3.3.9/3.5.0) to build this project, no extra wrapper scripts. |
It looks like this can only be solved if the JVM was started in admin-mode, no way to solve it when in default mode (which makes sense). Probably better to throw an Exception (IO or Security?) is such cases and to duplicate the related unittests with assumptions. |
The problem is not only on the JVM for UT execution :-(. A But at this point, we would introduce a test flag on the UT execution process (please run in admin mode, under W10) ; to prevent (initially) a test flag about core.symlinks Git option ... this is very restrictive for people under W10. It is not laziness, I know this is not the more beautiful solution as we spoke before ; but no move/creation in With that, W10 developer should do the clone correctly only once (admin mode & git option), and could then work (code, execute, ...) classically, without restrictions on permissions about execution. @rfscholte : WDYT ? |
I'm such a W10 user. IIUC that would mean I will never be able to test sym-links in UTs in default mode. So those tests can be skipped with explanation. We should have enough reviewers with different operating systems who can verify the behavior. |
If git clone was done in admin mode, test sym-links in UTs in default mode works perfectly (from src/test/resources). => OK, I will update the PR with a skip and WARN log in case of files are not present or symlinks. |
Minor change: Display output in Assert of 'Maven -version' for CommandlineTest
PR updated. SymlinksTest skipped with explanation if symlinks are not present and correct in CommandlineTest.testExecuteBinaryOnPathOutput of |
Rewrote this patch and merged it. Thanks! |
PR for #24.
Some unit tests require symlinks preservation during git clone.
Objective of this PR is to throw an explicit error with detail & git option to use.