Skip to content
Browse files

fix for jenkins-bug #JENKINS-17058

modified unit-test for resolving relative paths;
updated pom - integrate plugin-API for Jenkins1.510 and adapt for
Eclipse m2e
  • Loading branch information
afischer211 committed Apr 15, 2013
1 parent cba33ce commit a9d9ab51505ce83b3a6d507465e0b2bb9b72f558
Showing with 51 additions and 8 deletions.
  1. +5 −1 .gitignore
  2. +42 −3 pom.xml
  3. +4 −4 src/test/java/jenkins/plugins/publish_over/
@@ -24,4 +24,8 @@

45 pom.xml
@@ -27,9 +27,9 @@


@@ -164,7 +164,46 @@

<!-- <version>1.7</version> -->

@@ -49,15 +49,15 @@ public void setUp() throws Exception {

@Test public void testGetRelativePath() throws Exception {
final String relPath = "/some/path/to/dir";
final String relPath = "./some/path/to/dir";
final FilePath path = new FilePath(baseDir, relPath + "/");
assertEquals(relPath, buildInfo.getRelativePathToFile(path, null));
assertEquals(relPath.replace(".", ""), buildInfo.getRelativePathToFile(path, null));

@Test public void testGetRelativeDirectory() throws Exception {
final String relDir = "/some/path/to/dir";
final String relDir = "./some/path/to/dir";
final FilePath path = new FilePath(baseDir, relDir);
assertEquals(relDir, buildInfo.getRelativeDir(path, null));
assertEquals(relDir.replace(".", ""), buildInfo.getRelativeDir(path, null));


1 comment on commit a9d9ab5


This comment has been minimized.

Copy link

@bap2000 bap2000 commented on a9d9ab5 Dec 29, 2013

These tests are to check the method buildInfo.getRelativePathToFile and buildInfo.getRelativeDir which both should return a path relative to the baseDir NOT a test for building up the test filePath using a string with a dot in it.

You should revert this, and if you want to add another test, go ahead, but don't change the semantics of existing tests.

Please sign in to comment.