Ubuntu 14.04 - Laravel - Migrations fail, database not found

circle.yml

#1

Hi all,

Some of my unittests (Laravel 5.3 application) fail because the migrations can’t be executed, the error is the following:

SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = circle_test and table_name = migrations)

My setup is

machine:
php:
version: 7.0.11
environment:
ENVIRONMENT: testing
DB_URL: 127.0.0.1
DB_NAME: circle_test
DB_USER: ubuntu
DB_CONNECTION: mysql_test
APP_KEY: abcde…
services:
- elasticsearch
dependencies:
pre:
- echo “memory_limit = 1024M” > /opt/circleci/php/$(phpenv global)/etc/conf.d/memory.ini
override:
- composer install --no-interaction --no-scripts
post:
- wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.5/elasticsearch-2.3.5.tar.gz
- tar -xvf elasticsearch-2.3.5.tar.gz
- elasticsearch-2.3.5/bin/elasticsearch: {background: true}
# Make sure that Elasticsearch is up before running tests:
- sleep 10 && wget --waitretry=5 --retry-connrefused -v http://127.0.0.1:9200/

Not sure where it goes wrong, perhaps the user isn’t the correct one (ubuntu), I have not provided a custom .env file, all of the environment variables are quite probably correct, circle_test as a database and ubuntu as the user.


#2