package sqlancer.dbms;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assumptions.assumeTrue;

import org.junit.jupiter.api.Test;

import sqlancer.Main;

public class TestPostgres {

    @Test
    public void testPostgres() {
        String postgresAvailable = System.getenv("POSTGRES_AVAILABLE");
        boolean postgresIsAvailable = postgresAvailable != null && postgresAvailable.equalsIgnoreCase("true");
        assumeTrue(postgresIsAvailable);
        assertEquals(0,
                Main.executeMain(new String[] { "--random-seed", "0", "--timeout-seconds", TestConfig.SECONDS,
                        "--num-threads", "4", "--num-queries", TestConfig.NUM_QUERIES, "postgres", "--test-collations",
                        "false" }));
    }

}

@@ -231,55 +231,8 @@
  %7B%0A%0A
-    @Test%0A    public void testPostgres() %7B%0A    
     
@@ -299,20 +299,16 @@
 %22);%0A    
- 
-   
 boolean 
@@ -401,16 +401,60 @@
 %22true%22);
+%0A%0A    @Test%0A    public void testPostgres() %7B
 %0A       
@@ -786,10 +786,465 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void testPQS() %7B%0A        assumeTrue(postgresIsAvailable);%0A        assertEquals(0,%0A                Main.executeMain(new String%5B%5D %7B %22--random-seed%22, %220%22, %22--timeout-seconds%22, TestConfig.SECONDS,%0A                        %22--num-threads%22, %224%22, %22--num-queries%22, TestConfig.NUM_QUERIES, %22--random-string-generation%22,%0A                        %22ALPHANUMERIC_SPECIALCHAR%22, %22postgres%22, %22--test-collations%22, %22false%22, %22--oracle%22, %22pqs%22 %7D));%0A    %7D%0A%0A
 %7D%0A

Test PQS