Skip to content
Snippets Groups Projects
Commit 6f4b0c54 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

Migrated Reactome tests to new format (still some issues with Cache)

parent 3b47a2ad
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!499Spring config update
Pipeline #7312 failed
......@@ -51,12 +51,7 @@ import lcsb.mapviewer.reactome.utils.ReactomeQueryUtil;
@Transactional
@Rollback(false)
@ContextConfiguration(locations = { "/applicationContext-annotation.xml",
"/applicationContext-reactome.xml",
"/applicationContext-persist.xml",
"/test-applicationContext.xml",
"/test-dataSource.xml",
})
@ContextConfiguration(classes = SpringReactomeTestConfig.class)
@RunWith(SpringJUnit4ClassRunner.class)
public abstract class ReactomeTestFunctions {
private Logger logger = Logger.getLogger(ReactomeTestFunctions.class);
......
package lcsb.mapviewer.reactome;
import lcsb.mapviewer.persist.SpringPersistConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.security.crypto.password.NoOpPasswordEncoder;
@Configuration
@Import({SpringPersistConfig.class, SpringReactomeConfig.class})
public class SpringReactomeTestConfig {
@Bean
public NoOpPasswordEncoder passwordEncoder() {
return (NoOpPasswordEncoder) NoOpPasswordEncoder.getInstance();
}
}
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<!-- Testing Password Encoder used for hashing passwords -->
<bean id="PasswordEncoder" class="org.springframework.security.crypto.password.NoOpPasswordEncoder"/>
</beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<context:property-placeholder
ignore-resource-not-found="true"
location="classpath:test-db.properties,file:/etc/minerva/test-db.properties" />
<!-- Data Source Declaration -->
<bean id="DataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="org.postgresql.Driver" />
<property name="jdbcUrl" value="${database.uri}" />
<property name="user" value="${database.username}" />
<property name="password" value="${database.password}" />
<property name="maxPoolSize" value="90" />
<property name="maxStatements" value="5" />
<property name="minPoolSize" value="5" />
</bean>
<bean id="DbInit" class="lcsb.mapviewer.persist.CustomDatabasePopulator">
<property name="dataSource"><ref bean="DataSource"/></property>
</bean>
<bean id="startupScripts" class="org.springframework.jdbc.datasource.init.DataSourceInitializer">
<property name="dataSource"><ref bean="DataSource"/></property>
<property name="databasePopulator"><ref bean="DbInit"/></property>
<property name="enabled" value="true"/>
</bean>
</beans>
database.uri=jdbc:postgresql://localhost:5432/map_viewer
database.username=map_viewer
database.password=123qweasdzxc
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment