From dc103f808ce9c70b4dc0670d5c38bf0cf3eabdfa Mon Sep 17 00:00:00 2001 From: Dario Date: Tue, 2 Jul 2024 13:52:03 +0200 Subject: [PATCH] fix tests --- src/test/java/edu/ucsd/sbrg/db/BiGGDBTest.java | 10 ---------- src/test/java/edu/ucsd/sbrg/db/QueryOnceTest.java | 3 ++- .../edu/ucsd/sbrg/parsers/cobra/COBRAParserTest.java | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/test/java/edu/ucsd/sbrg/db/BiGGDBTest.java b/src/test/java/edu/ucsd/sbrg/db/BiGGDBTest.java index c36473b9..533b7d3c 100644 --- a/src/test/java/edu/ucsd/sbrg/db/BiGGDBTest.java +++ b/src/test/java/edu/ucsd/sbrg/db/BiGGDBTest.java @@ -16,16 +16,6 @@ @Testcontainers public class BiGGDBTest extends BiGGDBContainerTest { - @BeforeEach - public void setup() { - BiGGDB.init(bigg.getHost(), bigg.getFirstMappedPort().toString(), "postgres", "postgres", "bigg"); - } - - @Container - public GenericContainer bigg = new GenericContainer(DockerImageName.parse("schmirgel/bigg_db:1.6")) - .withExposedPorts(5432) - .withEnv("POSTGRES_PASSWORD", "postgres") - .withStartupTimeout(Duration.ofMinutes(5)); @Test public void getSubsystems() { diff --git a/src/test/java/edu/ucsd/sbrg/db/QueryOnceTest.java b/src/test/java/edu/ucsd/sbrg/db/QueryOnceTest.java index fde4c5d4..eafd73d1 100644 --- a/src/test/java/edu/ucsd/sbrg/db/QueryOnceTest.java +++ b/src/test/java/edu/ucsd/sbrg/db/QueryOnceTest.java @@ -1,12 +1,13 @@ package edu.ucsd.sbrg.db; +import edu.ucsd.sbrg.bigg.annotation.BiGGDBContainerTest; import org.junit.jupiter.api.Test; import java.util.Set; import static org.junit.jupiter.api.Assertions.assertEquals; -public class QueryOnceTest extends BiGGDBTest { +public class QueryOnceTest extends BiGGDBContainerTest { /** * This test serves primarily as documentation and to to raise awareness for diff --git a/src/test/java/edu/ucsd/sbrg/parsers/cobra/COBRAParserTest.java b/src/test/java/edu/ucsd/sbrg/parsers/cobra/COBRAParserTest.java index 491eae5e..c32535b5 100644 --- a/src/test/java/edu/ucsd/sbrg/parsers/cobra/COBRAParserTest.java +++ b/src/test/java/edu/ucsd/sbrg/parsers/cobra/COBRAParserTest.java @@ -9,7 +9,7 @@ import static edu.ucsd.sbrg.TestUtils.initParameters; import static org.junit.jupiter.api.Assertions.assertTrue; -public class COBRAParserTest { + public class COBRAParserTest { /** * This is here to call the static initializer code of the Registry class,