Add Drone CI
- Add drone test environment - Add drone config - apt phpunit - Fix api.php - Fix item.php - Fix DBStructure - Check if caching is possible during tests
This commit is contained in:
parent
b51dedd7e7
commit
d5dd12b8f8
19 changed files with 321 additions and 34 deletions
|
|
@ -37,7 +37,7 @@ class MemcacheCache extends Cache implements IMemoryCache
|
|||
$memcache_host = $config->get('system', 'memcache_host');
|
||||
$memcache_port = $config->get('system', 'memcache_port');
|
||||
|
||||
if (!$this->memcache->connect($memcache_host, $memcache_port)) {
|
||||
if (!@$this->memcache->connect($memcache_host, $memcache_port)) {
|
||||
throw new Exception('Expected Memcache server at ' . $memcache_host . ':' . $memcache_port . ' isn\'t available');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ class RedisCache extends Cache implements IMemoryCache
|
|||
$redis_pw = $config->get('system', 'redis_password');
|
||||
$redis_db = $config->get('system', 'redis_db', 0);
|
||||
|
||||
if (isset($redis_port) && !$this->redis->connect($redis_host, $redis_port)) {
|
||||
if (isset($redis_port) && !@$this->redis->connect($redis_host, $redis_port)) {
|
||||
throw new Exception('Expected Redis server at ' . $redis_host . ':' . $redis_port . ' isn\'t available');
|
||||
} elseif (!$this->redis->connect($redis_host)) {
|
||||
} elseif (!@$this->redis->connect($redis_host)) {
|
||||
throw new Exception('Expected Redis server at ' . $redis_host . ' isn\'t available');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use Friendica\Core\L10n;
|
|||
use Friendica\Core\Logger;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
require_once 'include/dba.php';
|
||||
require_once __DIR__ . '/../../include/dba.php';
|
||||
|
||||
/**
|
||||
* @brief This class contain functions for the database management
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class Database
|
|||
{
|
||||
// Use environment variables for mysql if they are set beforehand
|
||||
if (!empty($server['MYSQL_HOST'])
|
||||
&& !empty($server['MYSQL_USERNAME'] || !empty($server['MYSQL_USER']))
|
||||
&& (!empty($server['MYSQL_USERNAME'] || !empty($server['MYSQL_USER'])))
|
||||
&& $server['MYSQL_PASSWORD'] !== false
|
||||
&& !empty($server['MYSQL_DATABASE']))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue