[CI] Disable table verification for tests

The table was being checked before creation.
This commit is contained in:
ruan 2020-08-07 20:25:58 +02:00
parent 163bd48792
commit abc453bac8
2 changed files with 8 additions and 6 deletions

View File

@ -171,7 +171,7 @@ class Settings {
}
}
protected function connect() {
protected function connect($verify=true) {
$driver = $this->driver;
$host = $this->host;
$port = $this->port;
@ -197,9 +197,11 @@ class Settings {
try {
$this->conn = new PDO($dsn, $username, $password, $options);
if ($verify) {
$st = $this->conn->query("SELECT * FROM " . $this->table['config'] . " LIMIT 1;");
$st->fetch();
$st->closeCursor();
}
} catch (PDOException $e) {
Settings::handle_error($this, $e);
}

View File

@ -1,7 +1,7 @@
<?php
class EnvSettings extends Settings {
public function __construct($connect = true) {
public function __construct($connect = true, $verify = false) {
parent::__construct(false);
$this->host = getenv("MYSQL_HOST");
$this->database = getenv("MYSQL_DATABASE");
@ -11,6 +11,6 @@ class EnvSettings extends Settings {
$this->init_tables();
if ($connect) $this->connect();
if ($connect) $this->connect($verify);
}
}