|
25 | 25 |
|
26 | 26 | package integration; |
27 | 27 |
|
28 | | -import com.cloudbees.hudson.plugins.folder.ChildNameGenerator; |
29 | 28 | import hudson.model.Job; |
30 | 29 | import hudson.model.TopLevelItem; |
31 | 30 | import integration.harness.BasicMultiBranchProjectFactory; |
32 | | -import java.io.File; |
33 | 31 | import java.io.IOException; |
34 | | -import java.nio.charset.StandardCharsets; |
35 | 32 | import java.util.Collections; |
36 | 33 | import java.util.HashMap; |
37 | 34 | import java.util.Map; |
|
42 | 39 | import jenkins.scm.impl.mock.MockSCMController; |
43 | 40 | import jenkins.scm.impl.mock.MockSCMDiscoverBranches; |
44 | 41 | import jenkins.scm.impl.mock.MockSCMNavigator; |
45 | | -import org.apache.commons.io.FileUtils; |
46 | 42 | import org.apache.commons.io.IOUtils; |
47 | 43 | import org.apache.commons.lang.StringUtils; |
48 | 44 | import org.junit.AfterClass; |
|
54 | 50 | import static org.hamcrest.MatcherAssert.assertThat; |
55 | 51 | import static org.hamcrest.Matchers.containsInAnyOrder; |
56 | 52 | import static org.hamcrest.Matchers.instanceOf; |
57 | | -import static org.hamcrest.Matchers.is; |
58 | 53 | import static org.hamcrest.Matchers.notNullValue; |
59 | 54 |
|
60 | 55 | public class MigrationTest { |
@@ -228,13 +223,7 @@ private void assertDataMigrated(TopLevelItem foo) throws Exception { |
228 | 223 | jobByName.put(j.getFullName(), j); |
229 | 224 | jobByDirName.put(jobDirName, j); |
230 | 225 | jobByDisplayName.put(j.getFullDisplayName(), j); |
231 | | - File nameFile = new File(j.getRootDir(), ChildNameGenerator.CHILD_NAME_FILE); |
232 | | - assertThat("Exists: " + nameFile, nameFile.isFile(), is(true)); |
233 | | - assertThat("Contents: " + nameFile, FileUtils.readFileToString(nameFile, StandardCharsets.UTF_8), is(j.getName())); |
234 | 226 | } |
235 | | - File nameFile = new File(p.getRootDir(), ChildNameGenerator.CHILD_NAME_FILE); |
236 | | - assertThat("Exists: " + nameFile, nameFile.isFile(), is(true)); |
237 | | - assertThat("Contents: " + nameFile, FileUtils.readFileToString(nameFile, StandardCharsets.UTF_8), is(p.getName())); |
238 | 227 | } |
239 | 228 | assertThat("Display Names are repo names", byDisplayName.keySet(), containsInAnyOrder( |
240 | 229 | "test.example.com", |
|
0 commit comments