mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
[ZEPPELIN-3092] Fix notebook path for Git and GitHub tests
This commit is contained in:
parent
0e9db3f6a8
commit
14cb0241dd
2 changed files with 9 additions and 12 deletions
|
|
@ -54,8 +54,6 @@ public class GitHubNotebookRepoTest {
|
|||
String localRepositoryPath = System.getProperty("java.io.tmpdir") + "/ZeppelinTest_" +
|
||||
System.currentTimeMillis();
|
||||
|
||||
String currentPath = new File(".").getCanonicalFile().getPath();
|
||||
|
||||
// Create a fake remote notebook Git repository locally in another directory
|
||||
remoteZeppelinDir = new File(remoteRepositoryPath);
|
||||
remoteZeppelinDir.mkdirs();
|
||||
|
|
@ -75,9 +73,9 @@ public class GitHubNotebookRepoTest {
|
|||
String remoteTestNoteDir = Joiner.on(File.separator).join(remoteNotebooksDir, TEST_NOTE_ID);
|
||||
FileUtils.copyDirectory(
|
||||
new File(
|
||||
Joiner.on(File.separator).join(
|
||||
currentPath,"zeppelin-server", "src", "test", "resources", TEST_NOTE_ID
|
||||
)
|
||||
GitHubNotebookRepoTest.class.getResource(
|
||||
Joiner.on(File.separator).join("", TEST_NOTE_ID)
|
||||
).getFile()
|
||||
), new File(remoteTestNoteDir)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ public class GitNotebookRepoTest {
|
|||
@Before
|
||||
public void setUp() throws Exception {
|
||||
String zpath = System.getProperty("java.io.tmpdir") + "/ZeppelinTest_" + System.currentTimeMillis();
|
||||
String currentPath = new File(".").getCanonicalFile().getPath();
|
||||
zeppelinDir = new File(zpath);
|
||||
zeppelinDir.mkdirs();
|
||||
new File(zeppelinDir, "conf").mkdirs();
|
||||
|
|
@ -73,16 +72,16 @@ public class GitNotebookRepoTest {
|
|||
String testNoteDir2 = Joiner.on(File.separator).join(notebooksDir, TEST_NOTE_ID2);
|
||||
FileUtils.copyDirectory(
|
||||
new File(
|
||||
Joiner.on(File.separator).join(
|
||||
currentPath,"zeppelin-server", "src", "test", "resources", TEST_NOTE_ID
|
||||
)
|
||||
GitHubNotebookRepoTest.class.getResource(
|
||||
Joiner.on(File.separator).join("", TEST_NOTE_ID)
|
||||
).getFile()
|
||||
),
|
||||
new File(testNoteDir));
|
||||
FileUtils.copyDirectory(
|
||||
new File(
|
||||
Joiner.on(File.separator).join(
|
||||
currentPath,"zeppelin-server", "src", "test", "resources", TEST_NOTE_ID2
|
||||
)
|
||||
GitHubNotebookRepoTest.class.getResource(
|
||||
Joiner.on(File.separator).join("", TEST_NOTE_ID2)
|
||||
).getFile()
|
||||
),
|
||||
new File(testNoteDir2)
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue