PostreSQL: problem with empty password

Aah, im little bit further, thanks for giving right question

problem was here:

psql -c 'ALTER USER ubuntu with password 'test';' -U ubuntu;
ERROR:  syntax error at or near "test"

but now im in funny situation.

  1. if I alter user password, postgre says ALTER but i can still log in in ssh like psql -U ubuntu without asking any password
  2. If i want to create new user like this:
  - psql -c "CREATE user test with password 'test'";
  - psql -c "GRANT ALL PRIVILEGES ON DATABASE circle_test to test;";

I can loggin in ssh with psql -U test and providing password, but test still fails on:

  Doctrine\DBAL\Exception\ConnectionException: An exception occured in driver: SQLSTATE[08006] [7] FATAL:  password authentication failed for user "test"

and to your questions:

  1. is not but there is my circle.yml:
machine:

  timezone:
    Europe/Berlin

  php:
    version:
      5.6.14

  services:
    - redis
    - postgresql

dependencies:
  pre:
    - psql -c "CREATE user test with password 'test'";
    - psql -c "GRANT ALL PRIVILEGES ON DATABASE circle_test to test;";
    - composer install --dev --prefer-source --no-interaction
    - mv ./tests/config/config.local.neon ./tests/config/config.developers.neon
    - mv ./tests/config/config.circle.neon ./tests/config/config.local.neon

test:
  override:
    - ./vendor/bin/tester tests/
  1. as you can see i use default version of postgres on your servers.

Thanks for help.