Problem with testing API

apache
api
circle.yml

#1

Hello i’m trying to run behat (for REST API) test but i can not connect to server.

Here is my configuration circle.yml:

machine:
  timezone:
    Europe/Prague
  php:
    version: 7.0.7

dependencies:
  pre:
    - cp $HOME/$CIRCLE_PROJECT_REPONAME/app/config/parameters.yml.circle.dist $HOME/$CIRCLE_PROJECT_REPONAME/app/config/parameters.yml

  post:
    - sudo cp $HOME/$CIRCLE_PROJECT_REPONAME/app/config/robeeto.conf /etc/apache2/sites-available
    - sudo a2ensite robeeto.conf
    - sudo rm /etc/apache2/mods-enabled/php5.load
    - sudo service apache2 restart

database:
  override:
    - php app/console doctrine:migrations:migrate --no-interaction -e=test

test:
  override:
    - php bin/behat

Here is my robeeto.conf:

Listen 8080

<VirtualHost *:8080>
  LoadModule php7_module /opt/circleci/php/7.0.7/usr/lib/apache2/modules/libphp7.so

  DocumentRoot /home/ubuntu/my_project/web
  ServerName robeeto.com
  <FilesMatch \.php$>
    SetHandler application/x-httpd-php
  </FilesMatch>
</VirtualHost>

And error is: cURL error 6: Could not resolve host: rebeeto.com (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) (GuzzleHttp\Exception\ConnectException)

screen of error

Thanks


#2

Maybe try adding in a /etc/hosts entry?
https://circleci.com/docs/configuration/#hosts


#3

I already tried that but the result is the same.

Here is my screen of config: https://www.dropbox.com/s/5vjxvokfq0230ys/Screenshot%202016-12-13%2015.35.30.png?dl=0

and again error: https://www.dropbox.com/s/8ys6bu0ze8wf3ra/Screenshot%202016-12-13%2015.36.01.png?dl=0

and ofc here is conf file:

Listen 8080

<VirtualHost *:8080>
LoadModule php7_module /opt/circleci/php/7.0.7/usr/lib/apache2/modules/libphp7.so

DocumentRoot /home/ubuntu/my_project/web
ServerName robeeto.com
<FilesMatch .php$>
SetHandler application/x-httpd-php


#4