package org.synyx.urlaubsverwaltung;

import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.testcontainers.containers.MariaDBContainer;

import static org.testcontainers.containers.MariaDBContainer.NAME;

@DirtiesContext
public abstract class TestContainersBase {

    static MariaDBContainer<?> mariaDB = new MariaDBContainer<>(NAME + ":10.5");

    @DynamicPropertySource
    static void mariaDBProperties(DynamicPropertyRegistry registry) {
        mariaDB.start();
        registry.add("spring.datasource.url", mariaDB::getJdbcUrl);
        registry.add("spring.datasource.username", mariaDB::getUsername);
        registry.add("spring.datasource.password", mariaDB::getPassword);
    }
}

package org.synyx.urlaubsverwaltung;

import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.testcontainers.containers.MariaDBContainer;

import static org.testcontainers.containers.MariaDBContainer.IMAGE;

@DirtiesContext
public abstract class TestContainersBase {

    static MariaDBContainer<?> mariaDB = new MariaDBContainer<>(IMAGE + ":10.5");

    @DynamicPropertySource
    static void mariaDBProperties(DynamicPropertyRegistry registry) {
        mariaDB.start();
        registry.add("spring.datasource.url", mariaDB::getJdbcUrl);
        registry.add("spring.datasource.username", mariaDB::getUsername);
        registry.add("spring.datasource.password", mariaDB::getPassword);
    }
}

--- 
+++ 
@@ -5,12 +5,12 @@
 import org.springframework.test.context.DynamicPropertySource;
 import org.testcontainers.containers.MariaDBContainer;
 
-import static org.testcontainers.containers.MariaDBContainer.IMAGE;
+import static org.testcontainers.containers.MariaDBContainer.NAME;
 
 @DirtiesContext
 public abstract class TestContainersBase {
 
-    static MariaDBContainer<?> mariaDB = new MariaDBContainer<>(IMAGE + ":10.5");
+    static MariaDBContainer<?> mariaDB = new MariaDBContainer<>(NAME + ":10.5");
 
     @DynamicPropertySource
     static void mariaDBProperties(DynamicPropertyRegistry registry) {
Replace testcontainers deprecated image constant with name
