commit | c44904b6d605001ee2bd4f8cb1d9505d248702f9 | [log] [tgz] |
---|---|---|
author | Saša Živkov <sasa.zivkov@sap.com> | Mon Jun 19 15:49:19 2017 +0200 |
committer | Saša Živkov <sasa.zivkov@sap.com> | Mon Jun 19 16:58:47 2017 +0200 |
tree | 3c31f3adbec193cdba285a8178c9cca4fd67fa0a | |
parent | 6682300dce0af5293ef348a434bdb6dbc1056434 [diff] |
Clarify and fix sharedDirectory configuration It wasn't specified how main.sharedDirectory is resolved when it was given as a relative path. In particular it wasn't clear if the relative path was resolved against the current working directory of the Java process or against the $SITE_PATH. Resolve relative sharedDirectory against $SITE_PATH and document that and add a test case for the same. This change required changing the return type of the Main.sharedDirectory method to Path to make it cleaner. This introduced some ugliness in the test cases with the asserts as assertThat couldn't be used on Path instances due to a bug in the Google Truth [1]. When this gets merged into stable-2.14, we could switch to using the PathSubject [2] introduced by DavidO as a workaround for this issue. [1] https://github.com/google/truth/issues/285 [2] https://gerrit.googlesource.com/gerrit/+/master/gerrit-test-util/src/main/java/com/google/gerrit/extensions/common/PathSubject.java Change-Id: I7787bad4669514e2d27b1db975e62c9e43caea36