You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to create seed test database in my Azure PostgreSQL server. An error is thrown by CREATE DATABASE query in updatedb.go when the owner has the format username@hostname. This format is expected from the pgsql server to be able to connect to it.
Your environment
servian/TechChallengeApp
Steps to reproduce
Create Azure Postgresql server
Update conf.toml with the server configuration
Create seed database using updatedb.go
Expected behaviour
I should be able to run below and create seed database in Azure Postgresql server. ./TechChallengeApp updatedb
Actual behaviour
If I pass DbUser without @, Azure PostgreSQL does not like it. The app is unable to connect to database server.
If I pass DbUser with @, updatedb.go does not like it. It fails at the CREATE DATABASE step,
The text was updated successfully, but these errors were encountered:
There have been a number of Candidates working with Azure's implementation of PostgreSQL that used an '@' symbol to separate the user and host. Also part of the challenge is understanding when a cloud's database implementation gives you the ability to drop the whole database or not, and looking at the help messages of a black-box application to find workarounds.
Below is the help message from the application, I hope this provides the clue.
$ docker run --rm -it servian/techchallengeapp updatedb -h
Updates DB that has been defined in the configuration file. If no db exist, one will be created
Usage:
TechChallengeApp updatedb [flags]
Flags:
-h, --help help for updatedb
-s, --skip-create-db Use to skip the creation of the database
Subject of the issue
I am unable to create seed test database in my Azure PostgreSQL server. An error is thrown by CREATE DATABASE query in updatedb.go when the owner has the format username@hostname. This format is expected from the pgsql server to be able to connect to it.
Your environment
servian/TechChallengeApp
Steps to reproduce
Expected behaviour
I should be able to run below and create seed database in Azure Postgresql server.
./TechChallengeApp updatedb
Actual behaviour
If I pass DbUser without @, Azure PostgreSQL does not like it. The app is unable to connect to database server.
If I pass DbUser with @, updatedb.go does not like it. It fails at the CREATE DATABASE step,
The text was updated successfully, but these errors were encountered: