|
17 | 17 |
|
18 | 18 | package com.marklogic.gradle.task |
19 | 19 |
|
20 | | -import com.marklogic.hub.HubConfig |
| 20 | + |
21 | 21 | import org.gradle.testkit.runner.UnexpectedBuildFailure |
22 | 22 | import spock.lang.IgnoreIf |
23 | 23 |
|
@@ -51,24 +51,17 @@ class UpdateIndexesTaskTest extends BaseTest { |
51 | 51 |
|
52 | 52 | // Loading modules to databases |
53 | 53 | runTask('mlLoadModules') |
| 54 | + runTask('hubSaveIndexes') |
54 | 55 |
|
55 | | - // Copying Staging and Final database Index info files to src/main/entity-config dir |
| 56 | + // Copying Job database Index info files to src/main/entity-config dir |
56 | 57 | Path dir = hubConfig().getEntityDatabaseDir() |
57 | 58 | if (!dir.toFile().exists()) { |
58 | 59 | dir.toFile().mkdirs() |
59 | 60 | } |
60 | 61 |
|
61 | | - File dstFile = Paths.get(dir.toString(), HubConfig.STAGING_ENTITY_DATABASE_FILE).toFile() |
62 | | - String entityConfigStream = new File("src/test/resources/update-indexes/staging-database.json").getAbsolutePath() |
63 | | - Files.copy(new File(entityConfigStream).toPath(), dstFile.toPath(), StandardCopyOption.REPLACE_EXISTING) |
64 | | - |
65 | | - dstFile = Paths.get(dir.toString(), HubConfig.FINAL_ENTITY_DATABASE_FILE).toFile(); |
66 | | - entityConfigStream = new File("src/test/resources/update-indexes/final-database.json").getAbsolutePath() |
67 | | - Files.copy(new File(entityConfigStream).toPath(), dstFile.toPath(), StandardCopyOption.REPLACE_EXISTING) |
68 | | - |
69 | 62 | dir = hubConfig().getHubConfigDir() |
70 | | - dstFile = Paths.get(dir.toString(), "databases", "job-database.json").toFile() |
71 | | - entityConfigStream = new File("src/test/resources/update-indexes/job-database.json").getAbsolutePath(); |
| 63 | + File dstFile = Paths.get(dir.toString(), "databases", "job-database.json").toFile() |
| 64 | + String entityConfigStream = new File("src/test/resources/update-indexes/job-database.json").getAbsolutePath(); |
72 | 65 | Files.copy(new File(entityConfigStream).toPath(), dstFile.toPath(), StandardCopyOption.REPLACE_EXISTING); |
73 | 66 | } |
74 | 67 |
|
|
0 commit comments