package com.epam.ta.reportportal;

import com.epam.ta.reportportal.config.DatabaseConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;

import javax.sql.DataSource;

import static org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType.H2;

/**
 * @author Pavel Bortnik
 */
@Configuration
@Import(DatabaseConfiguration.class)
@EnableConfigurationProperties
@EnableAutoConfiguration
public class TestConfig {
	@Bean
	public DataSource dataSource() {
		return new EmbeddedDatabaseBuilder().generateUniqueName(true).setType(H2).setScriptEncoding("UTF-8").ignoreFailedDrops(true)
				//				.addScript("schema.sql")
				//				.addScripts("user_data.sql", "country_data.sql")
				.build();
	}
}

@@ -32,70 +32,8 @@
 l;%0A%0A
-import com.epam.ta.reportportal.config.DatabaseConfiguration;%0A
 impo
@@ -91,32 +91,32 @@
 oConfiguration;%0A
+
 import org.sprin
@@ -298,62 +298,8 @@
 on;%0A
-import org.springframework.context.annotation.Import;%0A
 impo
@@ -520,16 +520,16 @@
 nik%0A */%0A
+
 @Configu
@@ -539,45 +539,8 @@
 ion%0A
-@Import(DatabaseConfiguration.class)%0A
 @Ena

replace db config with boot auto configuration