Replies: 2 comments 3 replies
-
Since you are using Another way is to stop using |
Beta Was this translation helpful? Give feedback.
0 replies
-
What about this where I don't use sql.Db? It gives me the same error. I don't think I can use sqlmock because I have postgres specific queries.
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since I'm using sqlx in my application I'd need to mock my db through it. But I am having issues setting it up properly.
I'm new to testing so I must be doing something completely wrong. Here is what I wrote but can't figure out where the error is.
It results in
db_test.go:43: Testing the test DB Failed.failed to connect to 'host=/tmp user=root database=': dial error (dial unix /tmp/.s.PGSQL.5432: connect: no such file or directory)
Any help is appreciated,
Thank you
Beta Was this translation helpful? Give feedback.
All reactions