Exclude tests which require a database by default; enable them on Travis
This commit is contained in:
parent
b2b9a4bc9a
commit
b5ffcd38fa
@ -20,6 +20,7 @@ before_install:
|
||||
- mysql -u root test_db < extensions/database/test/conf/travis-mysql.sql
|
||||
- psql -c 'CREATE DATABASE test_db;' -U postgres
|
||||
- psql -U postgres test_db < extensions/database/test/conf/travis-pgsql.sql
|
||||
- cp extensions/database/test/conf/travis_int_tests.xml extensions/database/test/conf/int_tests.xml
|
||||
|
||||
script:
|
||||
- ./refine server_test
|
||||
|
@ -104,7 +104,7 @@
|
||||
<target name="test" depends="build_tests">
|
||||
<jacoco:coverage destfile="${test.report.dir}/jacoco.exec">
|
||||
<testng verbose="2" haltOnFailure="true" workingdir="${test.build.dir}"
|
||||
listener="org.testng.reporters.DotTestListener" excludedgroups="broken"
|
||||
listener="org.testng.reporters.DotTestListener"
|
||||
classpathref="extension.tests.class.path">
|
||||
<xmlfileset file="${test.src.dir}/conf/int_tests.xml"/>
|
||||
</testng>
|
||||
@ -130,7 +130,7 @@
|
||||
<target name="unit_test" depends="build_tests">
|
||||
<jacoco:coverage destfile="${test.report.dir}/jacoco.exec">
|
||||
<testng verbose="2" haltOnFailure="true" workingdir="${test.build.dir}"
|
||||
listener="org.testng.reporters.DotTestListener" excludedgroups="broken"
|
||||
listener="org.testng.reporters.DotTestListener"
|
||||
classpathref="extension.tests.class.path">
|
||||
<xmlfileset file="${test.src.dir}/conf/unit_tests.xml"/>
|
||||
</testng>
|
||||
|
@ -1,41 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<suite name="DatabaseExtensionUnitTestSuite">
|
||||
<parameter name = "mySqlDbName" value="test_db"/>
|
||||
<parameter name = "mySqlDbHost" value="127.0.0.1"/>
|
||||
<parameter name = "mySqlDbPort" value="3306"/>
|
||||
<parameter name = "mySqlDbUser" value="root"/>
|
||||
<!--
|
||||
To test the database extension against a particular
|
||||
database, provide the connection settings below,
|
||||
and remove the <exclude /> tag which corresponds
|
||||
to the database to test. All tests which rely on
|
||||
this database will then run.
|
||||
-->
|
||||
|
||||
<parameter name = "mySqlDbName" value="test_db"/>
|
||||
<parameter name = "mySqlDbHost" value="127.0.0.1"/>
|
||||
<parameter name = "mySqlDbPort" value="3306"/>
|
||||
<parameter name = "mySqlDbUser" value="root"/>
|
||||
<parameter name = "mySqlDbPassword" value=""/>
|
||||
<parameter name = "mySqlTestTable" value="test_table"/>
|
||||
|
||||
<parameter name = "pgSqlDbName" value="test_db"/>
|
||||
<parameter name = "pgSqlDbHost" value="127.0.0.1"/>
|
||||
<parameter name = "pgSqlDbPort" value="5432"/>
|
||||
<parameter name = "pgSqlDbUser" value="postgres"/>
|
||||
<parameter name = "pgSqlDbName" value="test_db"/>
|
||||
<parameter name = "pgSqlDbHost" value="127.0.0.1"/>
|
||||
<parameter name = "pgSqlDbPort" value="5432"/>
|
||||
<parameter name = "pgSqlDbUser" value="postgres"/>
|
||||
<parameter name = "pgSqlDbPassword" value=""/>
|
||||
<parameter name = "pgSqlTestTable" value="test_table"/>
|
||||
|
||||
<parameter name = "mariaDbName" value="test_db"/>
|
||||
<parameter name = "mariaDbHost" value="127.0.0.1"/>
|
||||
<parameter name = "mariadbDbPort" value="3306"/>
|
||||
<parameter name = "mariaDbUser" value="root"/>
|
||||
<parameter name = "mariaDbHost" value="127.0.0.1"/>
|
||||
<parameter name = "mariadbDbPort" value="3306"/>
|
||||
<parameter name = "mariaDbUser" value="root"/>
|
||||
<parameter name = "mariaDbPassword" value=""/>
|
||||
<parameter name = "mariaDbTestTable" value="test_table"/>
|
||||
<test name="DatabaseExtensionUnitTest">
|
||||
<classes>
|
||||
<class name="com.google.refine.extension.database.DatabaseImportControllerTest"/>
|
||||
<class name="com.google.refine.extension.database.DatabaseServiceTest"/>
|
||||
<class name="com.google.refine.extension.database.SimpleTextEncryptorTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.ConnectCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.ExecuteQueryCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.SavedConnectionCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.TestConnectCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.TestQueryCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.mariadb.MariaDBConnectionManagerTest"/>
|
||||
<class name="com.google.refine.extension.database.mariadb.MariaDBDatabaseServiceTest"/>
|
||||
<class name="com.google.refine.extension.database.mysql.MySQLConnectionManagerTest"/>
|
||||
<class name="com.google.refine.extension.database.mysql.MySQLDatabaseServiceTest"/>
|
||||
<class name="com.google.refine.extension.database.pgsql.PgSQLConnectionManagerTest"/>
|
||||
<class name="com.google.refine.extension.database.pgsql.PgSQLDatabaseServiceTest" />
|
||||
</classes>
|
||||
</test>
|
||||
</suite>
|
||||
<test name="DatabaseExtensionUnitTest">
|
||||
<groups>
|
||||
<run>
|
||||
<exclude name="requiresMySQL"/>
|
||||
<exclude name="requiresPgSQL"/>
|
||||
<exclude name="requiresMariaDB" />
|
||||
</run>
|
||||
</groups>
|
||||
<classes>
|
||||
<class name="com.google.refine.extension.database.DatabaseImportControllerTest"/>
|
||||
<class name="com.google.refine.extension.database.DatabaseServiceTest"/>
|
||||
<class name="com.google.refine.extension.database.SimpleTextEncryptorTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.ConnectCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.ExecuteQueryCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.SavedConnectionCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.TestConnectCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.TestQueryCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.mariadb.MariaDBConnectionManagerTest"/>
|
||||
<class name="com.google.refine.extension.database.mariadb.MariaDBDatabaseServiceTest"/>
|
||||
<class name="com.google.refine.extension.database.mysql.MySQLConnectionManagerTest"/>
|
||||
<class name="com.google.refine.extension.database.mysql.MySQLDatabaseServiceTest"/>
|
||||
<class name="com.google.refine.extension.database.pgsql.PgSQLConnectionManagerTest"/>
|
||||
<class name="com.google.refine.extension.database.pgsql.PgSQLDatabaseServiceTest" />
|
||||
</classes>
|
||||
</test>
|
||||
</suite>
|
||||
|
41
extensions/database/test/conf/travis_int_tests.xml
Normal file
41
extensions/database/test/conf/travis_int_tests.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<suite name="DatabaseExtensionUnitTestSuite">
|
||||
<parameter name = "mySqlDbName" value="test_db"/>
|
||||
<parameter name = "mySqlDbHost" value="127.0.0.1"/>
|
||||
<parameter name = "mySqlDbPort" value="3306"/>
|
||||
<parameter name = "mySqlDbUser" value="root"/>
|
||||
<parameter name = "mySqlDbPassword" value=""/>
|
||||
<parameter name = "mySqlTestTable" value="test_table"/>
|
||||
|
||||
<parameter name = "pgSqlDbName" value="test_db"/>
|
||||
<parameter name = "pgSqlDbHost" value="127.0.0.1"/>
|
||||
<parameter name = "pgSqlDbPort" value="5432"/>
|
||||
<parameter name = "pgSqlDbUser" value="postgres"/>
|
||||
<parameter name = "pgSqlDbPassword" value=""/>
|
||||
<parameter name = "pgSqlTestTable" value="test_table"/>
|
||||
|
||||
<parameter name = "mariaDbName" value="test_db"/>
|
||||
<parameter name = "mariaDbHost" value="127.0.0.1"/>
|
||||
<parameter name = "mariadbDbPort" value="3306"/>
|
||||
<parameter name = "mariaDbUser" value="root"/>
|
||||
<parameter name = "mariaDbPassword" value=""/>
|
||||
<parameter name = "mariaDbTestTable" value="test_table"/>
|
||||
<test name="DatabaseExtensionUnitTest">
|
||||
<classes>
|
||||
<class name="com.google.refine.extension.database.DatabaseImportControllerTest"/>
|
||||
<class name="com.google.refine.extension.database.DatabaseServiceTest"/>
|
||||
<class name="com.google.refine.extension.database.SimpleTextEncryptorTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.ConnectCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.ExecuteQueryCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.SavedConnectionCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.TestConnectCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.cmd.TestQueryCommandTest"/>
|
||||
<class name="com.google.refine.extension.database.mariadb.MariaDBConnectionManagerTest"/>
|
||||
<class name="com.google.refine.extension.database.mariadb.MariaDBDatabaseServiceTest"/>
|
||||
<class name="com.google.refine.extension.database.mysql.MySQLConnectionManagerTest"/>
|
||||
<class name="com.google.refine.extension.database.mysql.MySQLDatabaseServiceTest"/>
|
||||
<class name="com.google.refine.extension.database.pgsql.PgSQLConnectionManagerTest"/>
|
||||
<class name="com.google.refine.extension.database.pgsql.PgSQLDatabaseServiceTest" />
|
||||
</classes>
|
||||
</test>
|
||||
</suite>
|
Loading…
Reference in New Issue
Block a user