r688 - in trunk/echobase-services: . src/test/java/fr/ifremer/echobase/services src/test/java/fr/ifremer/echobase/services/embeddedapplication src/test/java/fr/ifremer/echobase/services/exportdb src/test/java/fr/ifremer/echobase/services/exportquery src/test/java/fr/ifremer/echobase/services/importdb src/test/resources src/test/resources/import-data
Author: tchemit Date: 2012-09-22 16:52:13 +0200 (Sat, 22 Sep 2012) New Revision: 688 Url: http://forge.codelutin.com/repositories/revision/echobase/688 Log: move test to their package + rename test data Added: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/embeddedapplication/ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/embeddedapplication/EmbeddedApplicationServiceIT.java trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportdb/ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportdb/ExportDbServiceTest.java trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportquery/ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportquery/ExportQueryServiceTest.java trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/importdb/ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/importdb/ImportDbServiceTest.java trunk/echobase-services/src/test/resources/echobase-importDb-referentiel.zip trunk/echobase-services/src/test/resources/import-data/echobase-catches-and-voyage-result.h2.db.gz trunk/echobase-services/src/test/resources/import-data/echobase-catches.h2.db.gz trunk/echobase-services/src/test/resources/import-data/echobase-commonData.h2.db.gz trunk/echobase-services/src/test/resources/import-data/echobase-nodata.h2.db.gz trunk/echobase-services/src/test/resources/import-data/echobase-operation.h2.db.gz Removed: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/EmbeddedApplicationServiceIT.java trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ExportDbServiceTest.java trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ExportQueryServiceTest.java trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ImportDbServiceTest.java trunk/echobase-services/src/test/resources/echobase-1.2-importDb-referentiel.zip trunk/echobase-services/src/test/resources/import-data/echobase-1.2-catches-and-voyage-result.h2.db.gz trunk/echobase-services/src/test/resources/import-data/echobase-1.2-catches.h2.db.gz trunk/echobase-services/src/test/resources/import-data/echobase-1.2-commonData.h2.db.gz trunk/echobase-services/src/test/resources/import-data/echobase-1.2-nodata.h2.db.gz trunk/echobase-services/src/test/resources/import-data/echobase-1.2-operation.h2.db.gz Modified: trunk/echobase-services/update-import-data-db.sh Deleted: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/EmbeddedApplicationServiceIT.java =================================================================== --- trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/EmbeddedApplicationServiceIT.java 2012-09-22 14:26:13 UTC (rev 687) +++ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/EmbeddedApplicationServiceIT.java 2012-09-22 14:52:13 UTC (rev 688) @@ -1,70 +0,0 @@ -/* - * #%L - * EchoBase :: Services - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2011 Ifremer, Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.echobase.services; - -import fr.ifremer.echobase.services.embeddedapplication.EmbeddedApplicationConfiguration; -import fr.ifremer.echobase.services.embeddedapplication.EmbeddedApplicationService; -import org.apache.commons.io.FileUtils; -import org.junit.Assert; -import org.junit.Test; -import org.nuiton.util.FileUtil; - -import java.io.File; - -/** - * Test {@link EmbeddedApplicationService}. - * - * @author tchemit <chemit@codelutin.com> - * @since 0.2 - */ -public class EmbeddedApplicationServiceIT extends EchoBaseTestServiceSupport { - - protected FakeEchoBaseServiceContext initContext() { - return new FakeEchoBaseServiceContext( - fixtures.IMPORT_DATA_ECHOBASE_COMMON_DATA()); - } - - @Test - public void testCreateEmbeddedApplication() throws Exception { - EmbeddedApplicationConfiguration conf = new EmbeddedApplicationConfiguration(); - conf.setVoyageIds(new String[]{getVoyageId()}); - - File workingDirectory = new File(getTestDir(), "work-dir"); - FileUtil.createDirectoryIfNecessary(workingDirectory); - conf.setWorkingDirectory(workingDirectory); - File warLocation = new File(workingDirectory, "echobase.war"); - FileUtils.write(warLocation, "dummy!"); - conf.setWarLocation(warLocation); - conf.setFileName("echobase"); - EmbeddedApplicationService service = - getService(EmbeddedApplicationService.class); - - File zipFile = service.createEmbeddedApplication(conf); - - Assert.assertTrue(zipFile.exists()); - Assert.assertEquals(100f, conf.getProgress(), 1); - - // TODO Test that embedded db has exactly same number of data than in incoming db - } -} Deleted: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ExportDbServiceTest.java =================================================================== --- trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ExportDbServiceTest.java 2012-09-22 14:26:13 UTC (rev 687) +++ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ExportDbServiceTest.java 2012-09-22 14:52:13 UTC (rev 688) @@ -1,338 +0,0 @@ -/* - * #%L - * EchoBase :: Services - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2011 - 2012 Ifremer, Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.echobase.services; - -import com.google.common.collect.Lists; -import com.google.common.collect.Sets; -import fr.ifremer.echobase.entities.EchoBaseEntityEnum; -import fr.ifremer.echobase.entities.data.Category; -import fr.ifremer.echobase.entities.data.Cell; -import fr.ifremer.echobase.entities.data.Data; -import fr.ifremer.echobase.entities.data.DataAcquisition; -import fr.ifremer.echobase.entities.data.DataProcessing; -import fr.ifremer.echobase.entities.data.Result; -import fr.ifremer.echobase.entities.data.Transect; -import fr.ifremer.echobase.entities.data.Voyage; -import fr.ifremer.echobase.entities.references.AcousticInstrument; -import fr.ifremer.echobase.entities.references.CellType; -import fr.ifremer.echobase.entities.references.DataMetadata; -import fr.ifremer.echobase.entities.references.Species; -import fr.ifremer.echobase.entities.references.SpeciesCategory; -import fr.ifremer.echobase.io.EchoBaseIOUtil; -import fr.ifremer.echobase.services.exportdb.ExportDbConfiguration; -import fr.ifremer.echobase.services.exportdb.ExportDbMode; -import fr.ifremer.echobase.services.exportdb.ExportDbService; -import junit.framework.Assert; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.junit.Test; -import org.nuiton.topia.TopiaException; -import org.nuiton.topia.persistence.TopiaDAO; -import org.nuiton.topia.persistence.csv.in.TopiaCsvImports; -import org.nuiton.topia.persistence.metadata.TableMeta; -import org.nuiton.util.FileUtil; - -import java.io.File; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -/** - * Test {@link ExportDbService}. - * - * @author tchemit <chemit@codelutin.com> - * @since 0.3 - */ -public class ExportDbServiceTest extends EchoBaseTestServiceSupport { - - protected FakeEchoBaseServiceContext initContext() { - return new FakeEchoBaseServiceContext( - fixtures.IMPORT_DATA_ECHOBASE_COMMON_DATA()); - } - - /** Logger. */ - private static final Log log = LogFactory.getLog(ExportDbServiceTest.class); - - @Override - public void setUp() throws Exception { - super.setUp(); - - TopiaDAO<Voyage> voyageDAO = getDAO(Voyage.class); - TopiaDAO<DataProcessing> dataProcessingDAO = getDAO(DataProcessing.class); - TopiaDAO<DataAcquisition> dataAcquisitionDAO = getDAO(DataAcquisition.class); - TopiaDAO<Cell> cellDAO = getDAO(Cell.class); - TopiaDAO<Category> categoryDAO = getDAO(Category.class); - TopiaDAO<Result> resultDAO = getDAO(Result.class); - TopiaDAO<SpeciesCategory> speciesCategoryDAO = getDAO(SpeciesCategory.class); - TopiaDAO<Data> dataDAO = getDAO(Data.class); - - - Voyage voyage = getEntityById(Voyage.class, getVoyageId()); - Assert.assertNotNull(voyage); - - Transect transect = voyage.getTransit().get(0).getTransect().get(0); - Assert.assertNotNull(transect); - - List<AcousticInstrument> acousticInstruments = getEntities(AcousticInstrument.class); - Assert.assertTrue(CollectionUtils.isNotEmpty(acousticInstruments)); - AcousticInstrument acousticInstrument = acousticInstruments.get(0); - DataAcquisition dataAcquisition = dataAcquisitionDAO.create( - DataAcquisition.PROPERTY_ACOUSTIC_INSTRUMENT, acousticInstrument - ); - transect.addDataAcquisition(dataAcquisition); - DataProcessing dataProcessing = dataProcessingDAO.create( - DataProcessing.PROPERTY_ID, "id", - DataProcessing.PROPERTY_PROCESSING_TEMPLATE, "processingtemplate" - ); - dataAcquisition.addDataProcessing(dataProcessing); - - List<Species> speciesList = getEntities(Species.class); - Assert.assertTrue(CollectionUtils.isNotEmpty(speciesList)); - Species species = speciesList.get(0); - - List<DataMetadata> dataMetadatas = getEntities(DataMetadata.class); - Assert.assertTrue(CollectionUtils.isNotEmpty(dataMetadatas)); - DataMetadata dataMetadata = dataMetadatas.get(0); - - SpeciesCategory speciesCategory = speciesCategoryDAO.create( - SpeciesCategory.PROPERTY_SPECIES, species - ); - - Category category = categoryDAO.create( - Category.PROPERTY_SPECIES_CATEGORY, speciesCategory - ); - - List<CellType> cellTypes = getEntities(CellType.class); - Assert.assertTrue(CollectionUtils.isNotEmpty(cellTypes)); - CellType cellType = cellTypes.get(0); - - Cell cell = cellDAO.create( - Cell.PROPERTY_NAME, "cellName", - Cell.PROPERTY_CELL_TYPE, cellType - ); - if (log.isInfoEnabled()) { - log.info("cell:" + cell.getTopiaId()); - } - dataProcessing.addCell(cell); - - Data cellData = dataDAO.create( - Data.PROPERTY_DATA_METADATA, dataMetadata, - Data.PROPERTY_DATA_VALUE, "cellDataValue" - ); - cell.addData(cellData); - Result cellResult = resultDAO.create( - Result.PROPERTY_CATEGORY, category, - Result.PROPERTY_DATA_METADATA, dataMetadata, - Result.PROPERTY_RESULT_LABEL, "cellResultLabel", - Result.PROPERTY_RESULT_VALUE, "cellResultValue" - ); - cell.addResult(cellResult); - - Cell childCell = cellDAO.create( - Cell.PROPERTY_NAME, "childCell", - Cell.PROPERTY_CELL_TYPE, cellType - ); - cell.addChilds(childCell); - - Data childCellData = dataDAO.create( - Data.PROPERTY_DATA_METADATA, dataMetadata, - Data.PROPERTY_DATA_VALUE, "childCellDataValue" - ); - childCell.addData(childCellData); - - Result childCellResult = resultDAO.create( - Result.PROPERTY_CATEGORY, category, - Result.PROPERTY_DATA_METADATA, dataMetadata, - Result.PROPERTY_RESULT_LABEL, "childCellResultLabel", - Result.PROPERTY_RESULT_VALUE, "childCellResultValue" - ); - childCell.addResult(childCellResult); - - Cell postCell = cellDAO.create( - Cell.PROPERTY_NAME, "postCellcellName", - Cell.PROPERTY_CELL_TYPE, cellType - ); - - postCell.addChilds(cell); - voyage.addPostCell(postCell); - - - Data postCellData = dataDAO.create( - Data.PROPERTY_DATA_METADATA, dataMetadata, - Data.PROPERTY_DATA_VALUE, "postCellDataValue" - ); - postCell.addData(postCellData); - - Result postCellResult = resultDAO.create( - Result.PROPERTY_CATEGORY, category, - Result.PROPERTY_DATA_METADATA, dataMetadata, - Result.PROPERTY_RESULT_LABEL, "postCellResultLabel", - Result.PROPERTY_RESULT_VALUE, "postCellResultValue" - ); - postCell.addResult(postCellResult); - - commitTransaction("Create cells"); - } - - @Test - public void exportReferential() throws IOException { - - ExportDbService service = getService(ExportDbService.class); - - ExportDbConfiguration conf = new ExportDbConfiguration(); - - File workingDirectory = new File(getTestDir(), "work-dir"); - FileUtil.createDirectoryIfNecessary(workingDirectory); - conf.setWorkingDirectory(workingDirectory); - conf.setFileName("echobase-referential"); - conf.setComputeSteps(true); - conf.setExportDbMode(ExportDbMode.REFERENTIAL); - service.doExport(conf); - File exportFile = conf.getExportFile(); - Assert.assertNotNull(exportFile); - Assert.assertTrue(exportFile.exists()); - - // check all tables (referential) where exported - ZipFile zipFile = new ZipFile(exportFile); - - Map<TableMeta<EchoBaseEntityEnum>, ZipEntry> tables = - TopiaCsvImports.discoverEntries( - "echobase/", getDbMeta().getReferenceTables(), - zipFile, Lists.<String>newArrayList()); - - checkAllTablesExported(zipFile, tables); - } - - @Test - public void exportData() throws IOException, TopiaException { - - ExportDbService service = getService(ExportDbService.class); - - ExportDbConfiguration conf = new ExportDbConfiguration(); - - conf.setVoyageIds(new String[]{getVoyageId()}); - - File workingDirectory = new File(getTestDir(), "work-dir"); - FileUtil.createDirectoryIfNecessary(workingDirectory); - conf.setWorkingDirectory(workingDirectory); - conf.setFileName("echobase-data"); - conf.setComputeSteps(true); - conf.setExportDbMode(ExportDbMode.DATA); - service.doExport(conf); - File exportFile = conf.getExportFile(); - Assert.assertNotNull(exportFile); - Assert.assertTrue(exportFile.exists()); - - // check all tables (referential + data) where exported - ZipFile zipFile = new ZipFile(exportFile); - - Map<TableMeta<EchoBaseEntityEnum>, ZipEntry> tables = - TopiaCsvImports.discoverEntries( - "echobase/", getDbMeta().getAllTables(), - zipFile, Lists.<String>newArrayList()); - - checkAllTablesExported(zipFile, tables); - } - - @Test - public void exportReferentialAndData() throws IOException { - - ExportDbService service = getService(ExportDbService.class); - - ExportDbConfiguration conf = new ExportDbConfiguration(); - - conf.setVoyageIds(new String[]{getVoyageId()}); - - File workingDirectory = new File(getTestDir(), "work-dir"); - FileUtil.createDirectoryIfNecessary(workingDirectory); - conf.setWorkingDirectory(workingDirectory); - conf.setFileName("echobase-referentialAndData"); - conf.setComputeSteps(true); - conf.setExportDbMode(ExportDbMode.REFERENTIAL_AND_DATA); - service.doExport(conf); - File exportFile = conf.getExportFile(); - Assert.assertNotNull(exportFile); - Assert.assertTrue(exportFile.exists()); - - - // check all tables (referential + data) where exported - ZipFile zipFile = new ZipFile(exportFile); - - Map<TableMeta<EchoBaseEntityEnum>, ZipEntry> tables = - TopiaCsvImports.discoverEntries( - "echobase/", getDbMeta().getAllTables(), - zipFile, Lists.<String>newArrayList()); - - checkAllTablesExported(zipFile, tables); - } - - @Test - public void exportAll() throws IOException { - - ExportDbService service = getService(ExportDbService.class); - - ExportDbConfiguration conf = new ExportDbConfiguration(); - conf.setVoyageIds(new String[]{getVoyageId()}); - - File workingDirectory = new File(getTestDir(), "work-dir"); - FileUtil.createDirectoryIfNecessary(workingDirectory); - conf.setWorkingDirectory(workingDirectory); - conf.setFileName("echobase-all"); - conf.setComputeSteps(true); - conf.setExportDbMode(ExportDbMode.ALL); - service.doExport(conf); - File exportFile = conf.getExportFile(); - Assert.assertNotNull(exportFile); - Assert.assertTrue(exportFile.exists()); - - - // check all tables (referential + data) where exported - ZipFile zipFile = new ZipFile(exportFile); - - Map<TableMeta<EchoBaseEntityEnum>, ZipEntry> tables = - TopiaCsvImports.discoverEntries( - "echobase/", getDbMeta().getAllTables(), - zipFile, Lists.<String>newArrayList()); - - checkAllTablesExported(zipFile, tables); - } - - private void checkAllTablesExported(ZipFile zipFile, Map<TableMeta<EchoBaseEntityEnum>, ZipEntry> tables) throws IOException { - for (Map.Entry<TableMeta<EchoBaseEntityEnum>, ZipEntry> entry : tables.entrySet()) { - TableMeta<EchoBaseEntityEnum> type = entry.getKey(); - if (type.getSource() == EchoBaseEntityEnum.Gear) { - // there is some extra lines so can not count from here... - //FIXME should use a csv import to read entries nstead - continue; - } - ZipEntry zipEntry = entry.getValue(); - long nbCells = EchoBaseIOUtil.countLines(zipFile, Sets.newHashSet(zipEntry)); - Assert.assertEquals(1 + getEntities(type.getEntityType()).size(), nbCells); - } - } - -} Deleted: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ExportQueryServiceTest.java =================================================================== --- trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ExportQueryServiceTest.java 2012-09-22 14:26:13 UTC (rev 687) +++ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ExportQueryServiceTest.java 2012-09-22 14:52:13 UTC (rev 688) @@ -1,71 +0,0 @@ -/* - * #%L - * EchoBase :: Services - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2011 - 2012 Ifremer, Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.echobase.services; - -import fr.ifremer.echobase.services.exportquery.ExportQueryService; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - -/** - * To test {@link ExportQueryService}. - * - * @author tchemit <chemit@codelutin.com> - * @since 0.3 - */ -public class ExportQueryServiceTest extends EchoBaseTestServiceSupport { - @Override - protected FakeEchoBaseServiceContext initContext() { - return new FakeEchoBaseServiceContext(null); - } - - ExportQueryService service; - - @Before - public void setup() { - service = getService(ExportQueryService.class); - } - - @Ignore - @Test - public void processLibreOfficeSqlQuery() throws Exception { - - processLibreOfficeSqlQuery("select \"t\".name FROM \"t\" WHERE rien;", - "select t.name FROM t WHERE rien;"); - - processLibreOfficeSqlQuery("select \"t\".name, \"s\".name FROM \"t\", \"s\" WHERE rien;", - "select t.name, s.name FROM t, s WHERE rien;"); - - processLibreOfficeSqlQuery("select \"t\".name FROM \"t\" WHERE (select \"s\".name FROM \"s\" WHERE rien2);", - "select t.name FROM t WHERE (select s.name FROM s WHERE rien2);"); - } - - protected void processLibreOfficeSqlQuery(String libreOfficeQuery, - String expected) { - - String actual = service.processLibreOfficeSqlQuery(libreOfficeQuery); - Assert.assertEquals(expected, actual); - } -} Deleted: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ImportDbServiceTest.java =================================================================== --- trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ImportDbServiceTest.java 2012-09-22 14:26:13 UTC (rev 687) +++ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ImportDbServiceTest.java 2012-09-22 14:52:13 UTC (rev 688) @@ -1,77 +0,0 @@ -/* - * #%L - * EchoBase :: Services - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2011 - 2012 Ifremer, Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.echobase.services; - -import fr.ifremer.echobase.entities.EchoBaseUser; -import fr.ifremer.echobase.entities.EchoBaseUserImpl; -import fr.ifremer.echobase.services.importdata.ImportException; -import fr.ifremer.echobase.services.importdb.ImportDbConfiguration; -import fr.ifremer.echobase.services.importdb.ImportDbMode; -import fr.ifremer.echobase.services.importdb.ImportDbService; -import org.junit.Assert; -import org.junit.Test; -import org.nuiton.util.FileUtil; - -import java.io.File; -import java.io.IOException; - -/** - * Tests the {@link ImportDbService}. - * - * @author tchemit <chemit@codelutin.com> - * @since 0.3 - */ -public class ImportDbServiceTest extends EchoBaseTestServiceSupport { - - public static final String DB_VERSION = "1.2"; - - @Override - protected FakeEchoBaseServiceContext initContext() { - return new FakeEchoBaseServiceContext(null); - } - - @Test - public void importDb() throws IOException, ImportException { - - ImportDbService service = getService(ImportDbService.class); - - ImportDbConfiguration conf = new ImportDbConfiguration(getLocale()); - - File workingDirectory = new File(getTestDir(), "work-dir"); - FileUtil.createDirectoryIfNecessary(workingDirectory); - conf.setWorkingDirectory(workingDirectory); - conf.setComputeSteps(true); - conf.setCommitAfterEachFile(false); - conf.setImportDbMode(ImportDbMode.REFERENTIAL); - prepareInputFile(conf.getInput(), fixtures.importDbReferentialPath()); - - EchoBaseUser user = new EchoBaseUserImpl(); - user.setEmail("testUser@fake.fr"); - - service.doImport(conf, user); - - Assert.assertTrue(conf.getProgress() > 94); - } - -} Copied: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/embeddedapplication/EmbeddedApplicationServiceIT.java (from rev 687, trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/EmbeddedApplicationServiceIT.java) =================================================================== --- trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/embeddedapplication/EmbeddedApplicationServiceIT.java (rev 0) +++ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/embeddedapplication/EmbeddedApplicationServiceIT.java 2012-09-22 14:52:13 UTC (rev 688) @@ -0,0 +1,72 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.embeddedapplication; + +import fr.ifremer.echobase.services.EchoBaseTestServiceSupport; +import fr.ifremer.echobase.services.FakeEchoBaseServiceContext; +import fr.ifremer.echobase.services.embeddedapplication.EmbeddedApplicationConfiguration; +import fr.ifremer.echobase.services.embeddedapplication.EmbeddedApplicationService; +import org.apache.commons.io.FileUtils; +import org.junit.Assert; +import org.junit.Test; +import org.nuiton.util.FileUtil; + +import java.io.File; + +/** + * Test {@link EmbeddedApplicationService}. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.2 + */ +public class EmbeddedApplicationServiceIT extends EchoBaseTestServiceSupport { + + protected FakeEchoBaseServiceContext initContext() { + return new FakeEchoBaseServiceContext( + fixtures.IMPORT_DATA_ECHOBASE_COMMON_DATA()); + } + + @Test + public void testCreateEmbeddedApplication() throws Exception { + EmbeddedApplicationConfiguration conf = new EmbeddedApplicationConfiguration(); + conf.setVoyageIds(new String[]{getVoyageId()}); + + File workingDirectory = new File(getTestDir(), "work-dir"); + FileUtil.createDirectoryIfNecessary(workingDirectory); + conf.setWorkingDirectory(workingDirectory); + File warLocation = new File(workingDirectory, "echobase.war"); + FileUtils.write(warLocation, "dummy!"); + conf.setWarLocation(warLocation); + conf.setFileName("echobase"); + EmbeddedApplicationService service = + getService(EmbeddedApplicationService.class); + + File zipFile = service.createEmbeddedApplication(conf); + + Assert.assertTrue(zipFile.exists()); + Assert.assertEquals(100f, conf.getProgress(), 1); + + // TODO Test that embedded db has exactly same number of data than in incoming db + } +} Property changes on: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/embeddedapplication/EmbeddedApplicationServiceIT.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportdb/ExportDbServiceTest.java (from rev 681, trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ExportDbServiceTest.java) =================================================================== --- trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportdb/ExportDbServiceTest.java (rev 0) +++ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportdb/ExportDbServiceTest.java 2012-09-22 14:52:13 UTC (rev 688) @@ -0,0 +1,336 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.exportdb; + +import com.google.common.collect.Lists; +import com.google.common.collect.Sets; +import fr.ifremer.echobase.entities.EchoBaseEntityEnum; +import fr.ifremer.echobase.entities.data.Category; +import fr.ifremer.echobase.entities.data.Cell; +import fr.ifremer.echobase.entities.data.Data; +import fr.ifremer.echobase.entities.data.DataAcquisition; +import fr.ifremer.echobase.entities.data.DataProcessing; +import fr.ifremer.echobase.entities.data.Result; +import fr.ifremer.echobase.entities.data.Transect; +import fr.ifremer.echobase.entities.data.Voyage; +import fr.ifremer.echobase.entities.references.AcousticInstrument; +import fr.ifremer.echobase.entities.references.CellType; +import fr.ifremer.echobase.entities.references.DataMetadata; +import fr.ifremer.echobase.entities.references.Species; +import fr.ifremer.echobase.entities.references.SpeciesCategory; +import fr.ifremer.echobase.io.EchoBaseIOUtil; +import fr.ifremer.echobase.services.EchoBaseTestServiceSupport; +import fr.ifremer.echobase.services.FakeEchoBaseServiceContext; +import junit.framework.Assert; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.Test; +import org.nuiton.topia.TopiaException; +import org.nuiton.topia.persistence.TopiaDAO; +import org.nuiton.topia.persistence.csv.in.TopiaCsvImports; +import org.nuiton.topia.persistence.metadata.TableMeta; +import org.nuiton.util.FileUtil; + +import java.io.File; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; + +/** + * Test {@link ExportDbService}. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class ExportDbServiceTest extends EchoBaseTestServiceSupport { + + protected FakeEchoBaseServiceContext initContext() { + return new FakeEchoBaseServiceContext( + fixtures.IMPORT_DATA_ECHOBASE_COMMON_DATA()); + } + + /** Logger. */ + private static final Log log = LogFactory.getLog(ExportDbServiceTest.class); + + @Override + public void setUp() throws Exception { + super.setUp(); + + TopiaDAO<DataProcessing> dataProcessingDAO = getDAO(DataProcessing.class); + TopiaDAO<DataAcquisition> dataAcquisitionDAO = getDAO(DataAcquisition.class); + TopiaDAO<Cell> cellDAO = getDAO(Cell.class); + TopiaDAO<Category> categoryDAO = getDAO(Category.class); + TopiaDAO<Result> resultDAO = getDAO(Result.class); + TopiaDAO<SpeciesCategory> speciesCategoryDAO = getDAO(SpeciesCategory.class); + TopiaDAO<Data> dataDAO = getDAO(Data.class); + + + Voyage voyage = getEntityById(Voyage.class, getVoyageId()); + Assert.assertNotNull(voyage); + + Transect transect = voyage.getTransit().get(0).getTransect().get(0); + Assert.assertNotNull(transect); + + List<AcousticInstrument> acousticInstruments = getEntities(AcousticInstrument.class); + Assert.assertTrue(CollectionUtils.isNotEmpty(acousticInstruments)); + AcousticInstrument acousticInstrument = acousticInstruments.get(0); + DataAcquisition dataAcquisition = dataAcquisitionDAO.create( + DataAcquisition.PROPERTY_ACOUSTIC_INSTRUMENT, acousticInstrument + ); + transect.addDataAcquisition(dataAcquisition); + DataProcessing dataProcessing = dataProcessingDAO.create( + DataProcessing.PROPERTY_ID, "id", + DataProcessing.PROPERTY_PROCESSING_TEMPLATE, "processingtemplate" + ); + dataAcquisition.addDataProcessing(dataProcessing); + + List<Species> speciesList = getEntities(Species.class); + Assert.assertTrue(CollectionUtils.isNotEmpty(speciesList)); + Species species = speciesList.get(0); + + List<DataMetadata> dataMetadatas = getEntities(DataMetadata.class); + Assert.assertTrue(CollectionUtils.isNotEmpty(dataMetadatas)); + DataMetadata dataMetadata = dataMetadatas.get(0); + + SpeciesCategory speciesCategory = speciesCategoryDAO.create( + SpeciesCategory.PROPERTY_SPECIES, species + ); + + Category category = categoryDAO.create( + Category.PROPERTY_SPECIES_CATEGORY, speciesCategory + ); + + List<CellType> cellTypes = getEntities(CellType.class); + Assert.assertTrue(CollectionUtils.isNotEmpty(cellTypes)); + CellType cellType = cellTypes.get(0); + + Cell cell = cellDAO.create( + Cell.PROPERTY_NAME, "cellName", + Cell.PROPERTY_CELL_TYPE, cellType + ); + if (log.isInfoEnabled()) { + log.info("cell:" + cell.getTopiaId()); + } + dataProcessing.addCell(cell); + + Data cellData = dataDAO.create( + Data.PROPERTY_DATA_METADATA, dataMetadata, + Data.PROPERTY_DATA_VALUE, "cellDataValue" + ); + cell.addData(cellData); + Result cellResult = resultDAO.create( + Result.PROPERTY_CATEGORY, category, + Result.PROPERTY_DATA_METADATA, dataMetadata, + Result.PROPERTY_RESULT_LABEL, "cellResultLabel", + Result.PROPERTY_RESULT_VALUE, "cellResultValue" + ); + cell.addResult(cellResult); + + Cell childCell = cellDAO.create( + Cell.PROPERTY_NAME, "childCell", + Cell.PROPERTY_CELL_TYPE, cellType + ); + cell.addChilds(childCell); + + Data childCellData = dataDAO.create( + Data.PROPERTY_DATA_METADATA, dataMetadata, + Data.PROPERTY_DATA_VALUE, "childCellDataValue" + ); + childCell.addData(childCellData); + + Result childCellResult = resultDAO.create( + Result.PROPERTY_CATEGORY, category, + Result.PROPERTY_DATA_METADATA, dataMetadata, + Result.PROPERTY_RESULT_LABEL, "childCellResultLabel", + Result.PROPERTY_RESULT_VALUE, "childCellResultValue" + ); + childCell.addResult(childCellResult); + + Cell postCell = cellDAO.create( + Cell.PROPERTY_NAME, "postCellcellName", + Cell.PROPERTY_CELL_TYPE, cellType + ); + + postCell.addChilds(cell); + voyage.addPostCell(postCell); + + + Data postCellData = dataDAO.create( + Data.PROPERTY_DATA_METADATA, dataMetadata, + Data.PROPERTY_DATA_VALUE, "postCellDataValue" + ); + postCell.addData(postCellData); + + Result postCellResult = resultDAO.create( + Result.PROPERTY_CATEGORY, category, + Result.PROPERTY_DATA_METADATA, dataMetadata, + Result.PROPERTY_RESULT_LABEL, "postCellResultLabel", + Result.PROPERTY_RESULT_VALUE, "postCellResultValue" + ); + postCell.addResult(postCellResult); + + commitTransaction("Create cells"); + } + + @Test + public void exportReferential() throws IOException { + + ExportDbService service = getService(ExportDbService.class); + + ExportDbConfiguration conf = new ExportDbConfiguration(); + + File workingDirectory = new File(getTestDir(), "work-dir"); + FileUtil.createDirectoryIfNecessary(workingDirectory); + conf.setWorkingDirectory(workingDirectory); + conf.setFileName("echobase-referential"); + conf.setComputeSteps(true); + conf.setExportDbMode(ExportDbMode.REFERENTIAL); + service.doExport(conf); + File exportFile = conf.getExportFile(); + Assert.assertNotNull(exportFile); + Assert.assertTrue(exportFile.exists()); + + // check all tables (referential) where exported + ZipFile zipFile = new ZipFile(exportFile); + + Map<TableMeta<EchoBaseEntityEnum>, ZipEntry> tables = + TopiaCsvImports.discoverEntries( + "echobase/", getDbMeta().getReferenceTables(), + zipFile, Lists.<String>newArrayList()); + + checkAllTablesExported(zipFile, tables); + } + + @Test + public void exportData() throws IOException, TopiaException { + + ExportDbService service = getService(ExportDbService.class); + + ExportDbConfiguration conf = new ExportDbConfiguration(); + + conf.setVoyageIds(new String[]{getVoyageId()}); + + File workingDirectory = new File(getTestDir(), "work-dir"); + FileUtil.createDirectoryIfNecessary(workingDirectory); + conf.setWorkingDirectory(workingDirectory); + conf.setFileName("echobase-data"); + conf.setComputeSteps(true); + conf.setExportDbMode(ExportDbMode.DATA); + service.doExport(conf); + File exportFile = conf.getExportFile(); + Assert.assertNotNull(exportFile); + Assert.assertTrue(exportFile.exists()); + + // check all tables (referential + data) where exported + ZipFile zipFile = new ZipFile(exportFile); + + Map<TableMeta<EchoBaseEntityEnum>, ZipEntry> tables = + TopiaCsvImports.discoverEntries( + "echobase/", getDbMeta().getAllTables(), + zipFile, Lists.<String>newArrayList()); + + checkAllTablesExported(zipFile, tables); + } + + @Test + public void exportReferentialAndData() throws IOException { + + ExportDbService service = getService(ExportDbService.class); + + ExportDbConfiguration conf = new ExportDbConfiguration(); + + conf.setVoyageIds(new String[]{getVoyageId()}); + + File workingDirectory = new File(getTestDir(), "work-dir"); + FileUtil.createDirectoryIfNecessary(workingDirectory); + conf.setWorkingDirectory(workingDirectory); + conf.setFileName("echobase-referentialAndData"); + conf.setComputeSteps(true); + conf.setExportDbMode(ExportDbMode.REFERENTIAL_AND_DATA); + service.doExport(conf); + File exportFile = conf.getExportFile(); + Assert.assertNotNull(exportFile); + Assert.assertTrue(exportFile.exists()); + + + // check all tables (referential + data) where exported + ZipFile zipFile = new ZipFile(exportFile); + + Map<TableMeta<EchoBaseEntityEnum>, ZipEntry> tables = + TopiaCsvImports.discoverEntries( + "echobase/", getDbMeta().getAllTables(), + zipFile, Lists.<String>newArrayList()); + + checkAllTablesExported(zipFile, tables); + } + + @Test + public void exportAll() throws IOException { + + ExportDbService service = getService(ExportDbService.class); + + ExportDbConfiguration conf = new ExportDbConfiguration(); + conf.setVoyageIds(new String[]{getVoyageId()}); + + File workingDirectory = new File(getTestDir(), "work-dir"); + FileUtil.createDirectoryIfNecessary(workingDirectory); + conf.setWorkingDirectory(workingDirectory); + conf.setFileName("echobase-all"); + conf.setComputeSteps(true); + conf.setExportDbMode(ExportDbMode.ALL); + service.doExport(conf); + File exportFile = conf.getExportFile(); + Assert.assertNotNull(exportFile); + Assert.assertTrue(exportFile.exists()); + + + // check all tables (referential + data) where exported + ZipFile zipFile = new ZipFile(exportFile); + + Map<TableMeta<EchoBaseEntityEnum>, ZipEntry> tables = + TopiaCsvImports.discoverEntries( + "echobase/", getDbMeta().getAllTables(), + zipFile, Lists.<String>newArrayList()); + + checkAllTablesExported(zipFile, tables); + } + + private void checkAllTablesExported(ZipFile zipFile, Map<TableMeta<EchoBaseEntityEnum>, ZipEntry> tables) throws IOException { + for (Map.Entry<TableMeta<EchoBaseEntityEnum>, ZipEntry> entry : tables.entrySet()) { + TableMeta<EchoBaseEntityEnum> type = entry.getKey(); + if (type.getSource() == EchoBaseEntityEnum.Gear) { + // there is some extra lines so can not count from here... + //FIXME should use a csv import to read entries nstead + continue; + } + ZipEntry zipEntry = entry.getValue(); + long nbCells = EchoBaseIOUtil.countLines(zipFile, Sets.newHashSet(zipEntry)); + Assert.assertEquals(1 + getEntities(type.getEntityType()).size(), nbCells); + } + } + +} Property changes on: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportdb/ExportDbServiceTest.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportquery/ExportQueryServiceTest.java (from rev 687, trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ExportQueryServiceTest.java) =================================================================== --- trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportquery/ExportQueryServiceTest.java (rev 0) +++ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportquery/ExportQueryServiceTest.java 2012-09-22 14:52:13 UTC (rev 688) @@ -0,0 +1,73 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.exportquery; + +import fr.ifremer.echobase.services.EchoBaseTestServiceSupport; +import fr.ifremer.echobase.services.FakeEchoBaseServiceContext; +import fr.ifremer.echobase.services.exportquery.ExportQueryService; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; + +/** + * To test {@link ExportQueryService}. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class ExportQueryServiceTest extends EchoBaseTestServiceSupport { + @Override + protected FakeEchoBaseServiceContext initContext() { + return new FakeEchoBaseServiceContext(null); + } + + ExportQueryService service; + + @Before + public void setup() { + service = getService(ExportQueryService.class); + } + + @Ignore + @Test + public void processLibreOfficeSqlQuery() throws Exception { + + processLibreOfficeSqlQuery("select \"t\".name FROM \"t\" WHERE rien;", + "select t.name FROM t WHERE rien;"); + + processLibreOfficeSqlQuery("select \"t\".name, \"s\".name FROM \"t\", \"s\" WHERE rien;", + "select t.name, s.name FROM t, s WHERE rien;"); + + processLibreOfficeSqlQuery("select \"t\".name FROM \"t\" WHERE (select \"s\".name FROM \"s\" WHERE rien2);", + "select t.name FROM t WHERE (select s.name FROM s WHERE rien2);"); + } + + protected void processLibreOfficeSqlQuery(String libreOfficeQuery, + String expected) { + + String actual = service.processLibreOfficeSqlQuery(libreOfficeQuery); + Assert.assertEquals(expected, actual); + } +} Property changes on: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/exportquery/ExportQueryServiceTest.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/importdb/ImportDbServiceTest.java (from rev 687, trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/ImportDbServiceTest.java) =================================================================== --- trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/importdb/ImportDbServiceTest.java (rev 0) +++ trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/importdb/ImportDbServiceTest.java 2012-09-22 14:52:13 UTC (rev 688) @@ -0,0 +1,76 @@ +/* + * #%L + * EchoBase :: Services + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.services.importdb; + +import fr.ifremer.echobase.entities.EchoBaseUser; +import fr.ifremer.echobase.entities.EchoBaseUserImpl; +import fr.ifremer.echobase.services.EchoBaseTestServiceSupport; +import fr.ifremer.echobase.services.FakeEchoBaseServiceContext; +import fr.ifremer.echobase.services.importdata.ImportException; +import org.junit.Assert; +import org.junit.Test; +import org.nuiton.util.FileUtil; + +import java.io.File; +import java.io.IOException; + +/** + * Tests the {@link ImportDbService}. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class ImportDbServiceTest extends EchoBaseTestServiceSupport { + + public static final String DB_VERSION = "1.2"; + + @Override + protected FakeEchoBaseServiceContext initContext() { + return new FakeEchoBaseServiceContext(null); + } + + @Test + public void importDb() throws IOException, ImportException { + + ImportDbService service = getService(ImportDbService.class); + + ImportDbConfiguration conf = new ImportDbConfiguration(getLocale()); + + File workingDirectory = new File(getTestDir(), "work-dir"); + FileUtil.createDirectoryIfNecessary(workingDirectory); + conf.setWorkingDirectory(workingDirectory); + conf.setComputeSteps(true); + conf.setCommitAfterEachFile(false); + conf.setImportDbMode(ImportDbMode.REFERENTIAL); + prepareInputFile(conf.getInput(), fixtures.importDbReferentialPath()); + + EchoBaseUser user = new EchoBaseUserImpl(); + user.setEmail("testUser@fake.fr"); + + service.doImport(conf, user); + + Assert.assertTrue(conf.getProgress() > 94); + } + +} Property changes on: trunk/echobase-services/src/test/java/fr/ifremer/echobase/services/importdb/ImportDbServiceTest.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/echobase-services/src/test/resources/echobase-1.2-importDb-referentiel.zip =================================================================== (Binary files differ) Copied: trunk/echobase-services/src/test/resources/echobase-importDb-referentiel.zip (from rev 687, trunk/echobase-services/src/test/resources/echobase-1.2-importDb-referentiel.zip) =================================================================== (Binary files differ) Property changes on: trunk/echobase-services/src/test/resources/echobase-importDb-referentiel.zip ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision HeadURL Deleted: trunk/echobase-services/src/test/resources/import-data/echobase-1.2-catches-and-voyage-result.h2.db.gz =================================================================== (Binary files differ) Deleted: trunk/echobase-services/src/test/resources/import-data/echobase-1.2-catches.h2.db.gz =================================================================== (Binary files differ) Deleted: trunk/echobase-services/src/test/resources/import-data/echobase-1.2-commonData.h2.db.gz =================================================================== (Binary files differ) Deleted: trunk/echobase-services/src/test/resources/import-data/echobase-1.2-nodata.h2.db.gz =================================================================== (Binary files differ) Deleted: trunk/echobase-services/src/test/resources/import-data/echobase-1.2-operation.h2.db.gz =================================================================== (Binary files differ) Copied: trunk/echobase-services/src/test/resources/import-data/echobase-catches-and-voyage-result.h2.db.gz (from rev 687, trunk/echobase-services/src/test/resources/import-data/echobase-1.2-catches-and-voyage-result.h2.db.gz) =================================================================== (Binary files differ) Property changes on: trunk/echobase-services/src/test/resources/import-data/echobase-catches-and-voyage-result.h2.db.gz ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision HeadURL Copied: trunk/echobase-services/src/test/resources/import-data/echobase-catches.h2.db.gz (from rev 687, trunk/echobase-services/src/test/resources/import-data/echobase-1.2-catches.h2.db.gz) =================================================================== (Binary files differ) Property changes on: trunk/echobase-services/src/test/resources/import-data/echobase-catches.h2.db.gz ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision HeadURL Copied: trunk/echobase-services/src/test/resources/import-data/echobase-commonData.h2.db.gz (from rev 687, trunk/echobase-services/src/test/resources/import-data/echobase-1.2-commonData.h2.db.gz) =================================================================== (Binary files differ) Property changes on: trunk/echobase-services/src/test/resources/import-data/echobase-commonData.h2.db.gz ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision HeadURL Copied: trunk/echobase-services/src/test/resources/import-data/echobase-nodata.h2.db.gz (from rev 687, trunk/echobase-services/src/test/resources/import-data/echobase-1.2-nodata.h2.db.gz) =================================================================== (Binary files differ) Property changes on: trunk/echobase-services/src/test/resources/import-data/echobase-nodata.h2.db.gz ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision HeadURL Copied: trunk/echobase-services/src/test/resources/import-data/echobase-operation.h2.db.gz (from rev 687, trunk/echobase-services/src/test/resources/import-data/echobase-1.2-operation.h2.db.gz) =================================================================== (Binary files differ) Property changes on: trunk/echobase-services/src/test/resources/import-data/echobase-operation.h2.db.gz ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/echobase-services/update-import-data-db.sh =================================================================== --- trunk/echobase-services/update-import-data-db.sh 2012-09-22 14:26:13 UTC (rev 687) +++ trunk/echobase-services/update-import-data-db.sh 2012-09-22 14:52:13 UTC (rev 688) @@ -8,7 +8,7 @@ exit fi -dbnameprefix="echobase-1.2" +dbnameprefix="echobase" dbDir=src/test/resources/import-data @@ -36,7 +36,7 @@ cp -v "$1" "src/test/resources/$dbnameprefix-importDb-referentiel.zip" -executeMaven fr.ifremer.echobase.services.ImportDbServiceTest nodata +executeMaven fr.ifremer.echobase.services.importdb.ImportDbServiceTest nodata executeMaven fr.ifremer.echobase.services.importdata.CommonAllImportServiceIT commonData
participants (1)
-
tchemit@users.forge.codelutin.com