#813 Move test resources to conform to package structure

This commit is contained in:
ljacqu
2016-07-02 10:57:30 +02:00
parent de3f3a42ab
commit 70226f7ddb
21 changed files with 16 additions and 13 deletions
@@ -35,7 +35,7 @@ public class FlatFileIntegrationTest {
@Before
public void copyFileToTemporaryFolder() throws IOException {
File originalFile = TestHelper.getJarFile("/datasource-integration/flatfile-test.txt");
File originalFile = TestHelper.getJarFile(TestHelper.PROJECT_ROOT + "datasource/flatfile-test.txt");
File copy = temporaryFolder.newFile();
Files.copy(originalFile, copy);
dataSource = new FlatFile(copy);
@@ -54,7 +54,7 @@ public class MySqlIntegrationTest extends AbstractDataSourceIntegrationTest {
set(DatabaseSettings.MYSQL_TABLE, "authme");
TestHelper.setupLogger();
Path sqlInitFile = TestHelper.getJarPath("/datasource-integration/sql-initialize.sql");
Path sqlInitFile = TestHelper.getJarPath(TestHelper.PROJECT_ROOT + "datasource/sql-initialize.sql");
sqlInitialize = new String(Files.readAllBytes(sqlInitFile));
}
@@ -53,7 +53,7 @@ public class SQLiteIntegrationTest extends AbstractDataSourceIntegrationTest {
set(DatabaseSettings.MYSQL_TABLE, "authme");
TestHelper.setupLogger();
Path sqlInitFile = TestHelper.getJarPath("/datasource-integration/sql-initialize.sql");
Path sqlInitFile = TestHelper.getJarPath(TestHelper.PROJECT_ROOT + "datasource/sql-initialize.sql");
// Note ljacqu 20160221: It appears that we can only run one statement per Statement.execute() so we split
// the SQL file by ";\n" as to get the individual statements
sqlInitialize = new String(Files.readAllBytes(sqlInitFile)).split(";(\\r?)\\n");