mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-18 07:14:09 +01:00
fixed broken test case
Former-commit-id: b4f434d0d19a24938b2e795d1773c551fba70474
This commit is contained in:
@@ -51,15 +51,15 @@ public class DatabaseUpdaterTest {
|
|||||||
old12 = Settings.getString(Settings.KEYS.CVE_MODIFIED_12_URL);
|
old12 = Settings.getString(Settings.KEYS.CVE_MODIFIED_12_URL);
|
||||||
old20 = Settings.getString(Settings.KEYS.CVE_MODIFIED_20_URL);
|
old20 = Settings.getString(Settings.KEYS.CVE_MODIFIED_20_URL);
|
||||||
|
|
||||||
File file = new File("target/test-classes/nvdcve-2012.xml");
|
File file = new File(this.getClass().getClassLoader().getResource("nvdcve-2012.xml").toURI());
|
||||||
String path = "file:///" + file.getCanonicalPath();
|
String path = "file:///" + file.getCanonicalPath();
|
||||||
Settings.setString(Settings.KEYS.CVE_MODIFIED_12_URL, path);
|
Settings.setString(Settings.KEYS.CVE_MODIFIED_12_URL, path);
|
||||||
|
|
||||||
file = new File("target/test-classes/nvdcve-2.0-2012.xml");
|
file = new File(this.getClass().getClassLoader().getResource("nvdcve-2.0-2012.xml").toURI());
|
||||||
path = "file:///" + file.getCanonicalPath();
|
path = "file:///" + file.getCanonicalPath();
|
||||||
Settings.setString(Settings.KEYS.CVE_MODIFIED_20_URL, path);
|
Settings.setString(Settings.KEYS.CVE_MODIFIED_20_URL, path);
|
||||||
|
|
||||||
file = new File("target/test-classes/data.zip");
|
file = new File(this.getClass().getClassLoader().getResource("data.zip").toURI());
|
||||||
path = "file:///" + file.getCanonicalPath();
|
path = "file:///" + file.getCanonicalPath();
|
||||||
Settings.setString(Settings.KEYS.BATCH_UPDATE_URL, path);
|
Settings.setString(Settings.KEYS.BATCH_UPDATE_URL, path);
|
||||||
}
|
}
|
||||||
@@ -78,8 +78,8 @@ public class DatabaseUpdaterTest {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBatchUpdate() throws Exception {
|
public void testBatchUpdate() throws Exception {
|
||||||
// DatabaseUpdater instance = new DatabaseUpdater();
|
DatabaseUpdater instance = new DatabaseUpdater();
|
||||||
// instance.deleteExistingData();
|
instance.deleteExistingData();
|
||||||
// instance.update();
|
instance.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user