package org.qamatic.mintleaf.postgres;

import org.junit.*;
import org.testcontainers.containers.PostgreSQLContainer;

import static org.junit.Assert.assertTrue;

@Ignore
public class PostgresTest {

    @Rule
    public PostgreSQLContainer postgres = new PostgreSQLContainer()
            .withDatabaseName("mydb")
            .withUsername("user")
            .withPassword("secret");

    @Before
    public void before() {
        postgres.start();
    }

    @After
    public void after() {
        postgres.stop();
    }

    @Test
    public void testConnect(){
        System.out.printf("postgres db running, db-name: '%s', user: '%s', jdbc-url: '%s'%n ",
                postgres.getDatabaseName(),
                postgres.getUsername(),
                postgres.getJdbcUrl());
        assertTrue(postgres.isRunning());
    }
}

@@ -160,15 +160,8 @@
 e;%0A%0A
-@Ignore
 %0Apub

test in docker