PluginsRepositoryTest: Skip test when expected env variables are not set

If either the TEST_SRCDIR or TEST_WORKSPACE environment variables is
not defined, the subsequent call to Paths.get will fail with NPE on
dereferencing the null value returned by System.getenv. This happens
when running the test in Eclipse and is expected because when running
in Eclipse the release.war is not built.

Refactor it so that the values are explicitly checked for nullness
prior to dereferencing, and the test is skipped if they are.

Also refactor the subsequent check for existence of the release.war to
an assumption that causes the test to skip, rather than failing.

Bug: Issue 11699
Change-Id: Ibf9463cc237bd0f613a09a093b5257af92e7efda
1 file changed
tree: bcf1a2cb223332b188e196f2b38b1fe3800ab775
  1. src/
  2. .gitignore
  3. BUCK
  4. BUILD
  5. LICENSE
  6. README.md
README.md

plugin-manager

Gerrit web-based plugin manager.

To enable this plugin, please look at the configuration guide