package io.vertx.asyncsql.test.postgresql

import org.junit.Test
import org.vertx.scala.core.json._
import org.vertx.testtools.VertxAssert._
import io.vertx.asyncsql.test.{ BaseSqlTests, SqlTestVerticle }
import scala.concurrent.Future

class BadlyConfiguredPostgreSqlTest extends SqlTestVerticle {

  override def getConfig() = baseConf.putString("username", "vertx").putString("password", "test").putString("database", "nonexistent")

  @Test
  def testNonExistentDatabase(): Unit = asyncTest {
    expectError(raw("SELECT 0")) map { reply =>
      assertTrue(reply.getString("message").contains("nonexistent"))
    }
  }

}
package io.vertx.asyncsql.test.postgresql

import org.junit.Test
import org.vertx.scala.core.json._
import org.vertx.testtools.VertxAssert._
import io.vertx.asyncsql.test.{ BaseSqlTests, SqlTestVerticle }
import scala.concurrent.Future

class BadlyConfiguredPostgreSqlTest extends SqlTestVerticle {

  override def getConfig() = baseConf.putString("database", "nonexistent")

  @Test
  def testNonExistentDatabase(): Unit = asyncTest {
    expectError(raw("SELECT 0")) map { reply =>
      assertTrue(reply.getString("message").contains("nonexistent"))
    }
  }
}
--- 
+++ 
@@ -8,7 +8,7 @@
 
 class BadlyConfiguredPostgreSqlTest extends SqlTestVerticle {
 
-  override def getConfig() = baseConf.putString("database", "nonexistent")
+  override def getConfig() = baseConf.putString("username", "vertx").putString("password", "test").putString("database", "nonexistent")
 
   @Test
   def testNonExistentDatabase(): Unit = asyncTest {
@@ -16,4 +16,5 @@
       assertTrue(reply.getString("message").contains("nonexistent"))
     }
   }
+
 }
Fix Jenkins configuration in test

Signed-off-by: Joern Bernhardt <7b85a41a628204b76aba4326273a3ccc74bd009a@campudus.com>
