Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create seed test data | Azure pgsql not liking username without @ #89

Closed
nehagargSeequent opened this issue Dec 5, 2021 · 1 comment
Labels
question Further information is requested

Comments

@nehagargSeequent
Copy link

nehagargSeequent commented Dec 5, 2021

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

  • 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.
image

If I pass DbUser with @, updatedb.go does not like it. It fails at the CREATE DATABASE step,
image

image

@tristanmorgan
Copy link
Contributor

Hi @nehagargSeequent

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

Ref: #20

@tristanmorgan tristanmorgan self-assigned this Dec 5, 2021
@tristanmorgan tristanmorgan added the question Further information is requested label Dec 5, 2021
@tristanmorgan tristanmorgan removed their assignment Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants