Skip to content

Commit

Permalink
Merge branch 'feature/JENKINS-24399_ClassDirectoryProblem' of git://g…
Browse files Browse the repository at this point in the history
…ithub.com/ikedam/script-security-plugin into JENKINS-24399
  • Loading branch information
Andres Rodriguez committed Apr 8, 2016
2 parents cf27d25 + b380684 commit e204a86
Showing 1 changed file with 20 additions and 0 deletions.
Expand Up @@ -46,6 +46,7 @@
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Publisher;
import java.io.File;
import java.io.FileFilter;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -610,6 +611,25 @@ private List<File> getAllUpdatedJarFiles() throws URISyntaxException {
r.assertBuildStatusSuccess(b);
assertEquals(testingDisplayName, b.getDisplayName());
}

// add a new file in a subdirectory of the tmpDir.
{
File f = tmpFolderRule.newFile();
File targetDir = tmpDir.listFiles(new FileFilter(){
public boolean accept(File pathname) {
return pathname.isDirectory();
}

})[0];
FileUtils.copyFileToDirectory(f, targetDir);
}

// Should fail as the class directory is updated.
{
FreeStyleBuild b = p.scheduleBuild2(0).get();
r.assertBuildStatus(Result.FAILURE, b);
assertNotEquals(testingDisplayName, b.getDisplayName());
}
}

@Test public void testDifferentClasspathButSameContent() throws Exception {
Expand Down

0 comments on commit e204a86

Please sign in to comment.