mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-08 22:29:33 +00:00
Fixed use of network share drives
Signed-off-by: Smoss <Smoss117@gmail.com>
This commit is contained in:
parent
3da6a71a68
commit
d453da65cf
@ -60,31 +60,34 @@ import org.netbeans.junit.NbModuleSuite;
|
|||||||
import org.openide.util.Exceptions;
|
import org.openide.util.Exceptions;
|
||||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||||
import org.sleuthkit.autopsy.keywordsearch.*;
|
import org.sleuthkit.autopsy.keywordsearch.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This test expects the following system properties to be set:
|
* This test expects the following system properties to be set: img_path: The
|
||||||
* img_path: The fully qualified path to the image file (if split, the first file)
|
* fully qualified path to the image file (if split, the first file) out_path:
|
||||||
* out_path: The location where the case will be stored
|
* The location where the case will be stored nsrl_path: Path to the nsrl
|
||||||
* nsrl_path: Path to the nsrl database
|
* database known_bad_path: Path to a database of known bad hashes keyword_path:
|
||||||
* known_bad_path: Path to a database of known bad hashes
|
* Path to a keyword list xml file ignore_unalloc: Boolean whether to ignore
|
||||||
* keyword_path: Path to a keyword list xml file
|
* unallocated space or not
|
||||||
* ignore_unalloc: Boolean whether to ignore unallocated space or not
|
|
||||||
*
|
*
|
||||||
* Without these properties set, the test will fail to run correctly.
|
* Without these properties set, the test will fail to run correctly. To run
|
||||||
* To run this test correctly, you should use the script 'regression.py'
|
* this test correctly, you should use the script 'regression.py' located in the
|
||||||
* located in the 'script' directory of the Testing module.
|
* 'script' directory of the Testing module.
|
||||||
*/
|
*/
|
||||||
public class RegressionTest extends TestCase {
|
public class RegressionTest extends TestCase {
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(RegressionTest.class.getName());
|
private static final Logger logger = Logger.getLogger(RegressionTest.class.getName());
|
||||||
long start;
|
long start;
|
||||||
|
|
||||||
/** Constructor required by JUnit */
|
/**
|
||||||
|
* Constructor required by JUnit
|
||||||
|
*/
|
||||||
public RegressionTest(String name) {
|
public RegressionTest(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
/** Creates suite from particular test cases. */
|
* Creates suite from particular test cases.
|
||||||
|
*/
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
// run tests with specific configuration
|
// run tests with specific configuration
|
||||||
NbModuleSuite.Configuration conf = NbModuleSuite.createConfiguration(RegressionTest.class).
|
NbModuleSuite.Configuration conf = NbModuleSuite.createConfiguration(RegressionTest.class).
|
||||||
@ -100,21 +103,24 @@ public class RegressionTest extends TestCase{
|
|||||||
"testAddSourceWizard1",
|
"testAddSourceWizard1",
|
||||||
"testIngest",
|
"testIngest",
|
||||||
"testGenerateReportToolbar",
|
"testGenerateReportToolbar",
|
||||||
"testGenerateReportButton"
|
"testGenerateReportButton");
|
||||||
);
|
|
||||||
return NbModuleSuite.create(conf);
|
return NbModuleSuite.create(conf);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Method called before each test case. */
|
/**
|
||||||
|
* Method called before each test case.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
|
|
||||||
logger.info("######## " + System.getProperty("img_path") + " #######");
|
logger.info("######## " + System.getProperty("img_path") + " #######");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Method called after each test case. */
|
/**
|
||||||
|
* Method called after each test case.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void tearDown() {
|
public void tearDown() {
|
||||||
}
|
}
|
||||||
@ -146,7 +152,11 @@ public class RegressionTest extends TestCase{
|
|||||||
logger.info("Starting Add Image process");
|
logger.info("Starting Add Image process");
|
||||||
WizardOperator wo = new WizardOperator("Add Data");
|
WizardOperator wo = new WizardOperator("Add Data");
|
||||||
JTextFieldOperator jtfo0 = new JTextFieldOperator(wo, 0);
|
JTextFieldOperator jtfo0 = new JTextFieldOperator(wo, 0);
|
||||||
String imageDir = System.getProperty("img_path");
|
String img_path = System.getProperty("img_path");
|
||||||
|
if (img_path.startsWith("\\")) {
|
||||||
|
img_path = "\\" + img_path;
|
||||||
|
}
|
||||||
|
String imageDir = img_path;
|
||||||
((JTextField) jtfo0.getSource()).setText(imageDir);
|
((JTextField) jtfo0.getSource()).setText(imageDir);
|
||||||
wo.btNext().clickMouse();
|
wo.btNext().clickMouse();
|
||||||
}
|
}
|
||||||
@ -324,8 +334,8 @@ public class RegressionTest extends TestCase{
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void setListForIngest()
|
|
||||||
{
|
private void setListForIngest() {
|
||||||
KeywordSearchListsXML curr = KeywordSearchListsXML.getCurrent();
|
KeywordSearchListsXML curr = KeywordSearchListsXML.getCurrent();
|
||||||
curr.setUseForIngest("URLs", true);
|
curr.setUseForIngest("URLs", true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user