#Postgres Tests
1 messages · Page 1 of 1 (latest)
Hello @pliant thorn , we have recently switched to Ginkgo for database tests, and we haven't labeled it, and it's working entirely according to Postgres specification. I will open an issue for this. Is this urgently needed for you?
Well I needed to test Data Bundle for the in memory db I was working on
But I get the same error
Can you share the error there? If you write 'go test' inside internal/storage/postgres, it should work.
Does it work when you write just go test in the path you are in?
Sorry about that was missing a test Spec function, got the tests passing now
though I'm unable to fix this import cycle not allowed error when trying to use a database factory, I've also tried just making a memdb instance directly but importing schema gets me back to that same error
Currently for the tests the schema is hardcoded in the test itself
@glass wagon Could you look at this if you have time?
@glass wagon Hi sorry to tag you again, just bumping this in case you may missed it.
Hello @pliant thorn , can you try creating a database without using a factory? You can refer to the Postgres test example. Or, you can copy the code inside the factory and run it here.
in the 2nd screenshot I tried making the memdb instance directory without factory, but importing migrations schema caused import cycle again
I’m quite new to Go lang coming from Typescript so this is a bit confusing
Can you send me the list of cycles? It should appear in the details of this error message.
Doesn’t shows me a list that’s the entire error when I hover over it
Can you try running it in the terminal? Full error will be visible in the terminal
I figured it out, moved the table name consts to a new package that did the trick, cleaning it up for the PR now
@placid tree Hi, I was wondering if a partial bounty for DataBundles issue is possible? I've got Bundle Read, Write & Delete to work, but haven't been able to make RunBundle work
The tests are passing for Read, Write & Delete
That can be doable, but since I don’t know the exact technical details lets get @glass wagon’s thoughts on this.