Skip to content

Commit

Permalink
#54 Move DatabaseInitializer to commons
Browse files Browse the repository at this point in the history
  • Loading branch information
vityaman committed Nov 13, 2024
1 parent d5fe39d commit 402a960
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.junit4.SpringRunner
import ru.ifmo.se.dating.Application
import ru.ifmo.se.dating.PostgresInitializer

@RunWith(SpringRunner::class)
@ActiveProfiles(profiles = ["test"])
Expand All @@ -16,7 +17,7 @@ import ru.ifmo.se.dating.Application
)
@ContextConfiguration(
initializers = [
DatabaseInitializer::class,
PostgresInitializer::class,
],
)
abstract class AuthikTestSuite
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package ru.ifmo.se.dating.authik
package ru.ifmo.se.dating

import org.springframework.boot.test.util.TestPropertyValues
import org.springframework.context.ApplicationContextInitializer
import org.springframework.context.ConfigurableApplicationContext
import ru.ifmo.se.dating.container.Postgres

class DatabaseInitializer :
class PostgresInitializer :
ApplicationContextInitializer<ConfigurableApplicationContext> {
private val postgres: Postgres = Postgres.start()

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.junit4.SpringRunner
import ru.ifmo.se.dating.Application
import ru.ifmo.se.dating.PostgresInitializer

@RunWith(SpringRunner::class)
@ActiveProfiles(profiles = ["test"])
Expand All @@ -16,7 +17,7 @@ import ru.ifmo.se.dating.Application
)
@ContextConfiguration(
initializers = [
DatabaseInitializer::class,
PostgresInitializer::class,
],
)
abstract class MatchmakerTestSuite

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.junit4.SpringRunner
import ru.ifmo.se.dating.Application
import ru.ifmo.se.dating.PostgresInitializer

@RunWith(SpringRunner::class)
@ActiveProfiles(profiles = ["test"])
Expand All @@ -16,7 +17,7 @@ import ru.ifmo.se.dating.Application
)
@ContextConfiguration(
initializers = [
DatabaseInitializer::class,
PostgresInitializer::class,
],
)
abstract class PeopleTestSuite

0 comments on commit 402a960

Please sign in to comment.