You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to run a docker with an instance of my database running in it. The data base needs some config that is in my application.yaml - even for local run.
We rather not hard code that information or make another file to load at run time.
Would be good if Micronaut added this to their backlog, to add "@beforeeach" support as a regular method in "@MicronautTest" Right now need to implement it in:
@MicronautTest
@Requires(property = "MICRONAUT_ENVIRONMENTS", value = "localTest")
@Suite
@SelectClasses(
AaLocalTestSuiteWithDocker::class,
ArtControllerTests::class,
HistoryControllerTest::class
)
class AaLocalTestSuiteWithDocker
(
private val dynamoDbTableCreator: DynamoDbTableCreator,
private val dynanamoConfiguration: DynamoConfiguration,
private val dynamoDbClient: DynamoDbClient
) {
...
companion object {
@BeforeAll
@JvmStatic
fun beforeAll2(){
logger.info("beforeAll2")
}
...
}
Right now I keep a private var haveRunBeforeAllTests: Boolean = false
then a "@beforeeach" and check if this has run before
@BeforeEach
fun beforeEachWithCheckForOnce() {
logger.info("beforeEachWithCheckForOnce")
if (haveRunBeforeAllTests) return
haveRunBeforeAllTests = true
logger.info("Executing setup tasks before each test")
LocalStackSetup.setup()
The text was updated successfully, but these errors were encountered:
Feature description
We want to run a docker with an instance of my database running in it. The data base needs some config that is in my application.yaml - even for local run.
We rather not hard code that information or make another file to load at run time.
Would be good if Micronaut added this to their backlog, to add "@beforeeach" support as a regular method in "@MicronautTest" Right now need to implement it in:
Right now I keep a private var haveRunBeforeAllTests: Boolean = false
then a "@beforeeach" and check if this has run before
The text was updated successfully, but these errors were encountered: