1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.git.model;
17
18 import java.io.BufferedReader;
19 import java.io.File;
20 import java.io.FileInputStream;
21 import java.io.IOException;
22 import java.io.InputStreamReader;
23
24 import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
25 import org.apache.commons.io.FileUtils;
26 import org.junit.Assert;
27 import org.junit.Test;
28 import org.junit.runner.RunWith;
29 import org.junit.runners.BlockJUnit4ClassRunner;
30 import org.kuali.student.git.importer.GitImporterMain;
31
32
33
34
35
36
37
38 @RunWith(BlockJUnit4ClassRunner.class)
39 public class TestKSRevision29500 {
40
41
42
43
44 public TestKSRevision29500() {
45 }
46
47 @Test
48 public void testRevision29500 () throws IOException {
49 File gitRepository = new File ("target/ks-r29500");
50
51 FileUtils.deleteDirectory(gitRepository);
52
53 GitRepositoryUtils
54 .buildFileRepository(gitRepository, true);
55
56 GitImporterMain.main(new String [] {"src/test/resources/ks-r29500.dump.bz2", gitRepository.getAbsolutePath(), "target/ks-r29500-ks-veto.log", "target/ks-r29500-ks-copyFrom-skipped.log", "target/ks-r29500-blob.log", "0", "https://svn.kuali.org/repos/student", "uuid"});
57
58 BufferedReader reader = new BufferedReader(new InputStreamReader(new BZip2CompressorInputStream(new FileInputStream("target/ks-r29500/jsvn/merge.map"))));
59
60 String line1 = reader.readLine();
61
62 Assert.assertNotNull(line1);
63
64 Assert.assertEquals(true, line1.startsWith("29500::branches/ks-1.3::branches/ks-1.3-ec1::"));
65
66 String line2 = reader.readLine();
67
68 Assert.assertNotNull(line2);
69
70 Assert.assertEquals(true, line2.startsWith("29500::branches/ks-1.3::branches/ks-1.3-merge:"));
71
72 reader.close();
73
74 }
75
76 }