Your problem is that this PostgreSQL identifier, not a key value pair:
authentication-server_test
The above needs quotes to be quoted so that PostgreSQL won’t try to interpret the -
as an operator. Other wise, the latter will happen. Identifiers are quoted with double quotes so you need to this:
"authentication-server_test"
Into the database. You could escape the double quotes in your .travis.yml
:
before_script:
- bundle exec rake lint
- "psql -c 'create database \"authentication-server_test\";' -U postgres"
Drop the outer double quotes (the YAML quotes for the string) while adding the inner double quotes (for the PostgreSQL identifier):
before_script:
- bundle exec rake lint
- psql -c 'create database "authentication-server_test";' -U postgres
Alternatively you can switch to createdb
about avoid the problem altogether:
before_script:
- bundle exec rake lint
- createdb authentication-server_test -U postgres
So as you can see its’ not a key value pair problem it’s only having to worry about the shell’s and YAML’s quoting needs (neither of which apply here).