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"))
    }
  }
}
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"))
    }
  }

}
Fix Jenkins configuration in test
Fix Jenkins configuration in test

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