Comments (3)
I haven't really looked for a database testing framework, though I hear sqlite has 300% code coverage, so maybe I should look at how their tests are set up.
I was planning on fleshing out the testing story by writing some failure tests to cover the error cases, testing against multiple postgres versions in ci, and writing more unit tests.
I especially think testing will be important for ensuring the correctness of the association code once that gets more fleshed out. My guess is that could get decently hairy because of cyclic data structures and whatnot.
In terms of automation and fuzz testing it might be cool to try to automatically generate database schemas and assert certain properties about them. That sounds like a pretty big undertaking though. I guess we could try to see if we could hook up go-fuzz
to the schema generator in order to fully explore the code paths in pggen
.
from pggen.
I have now written some cli testing infrastructure which does a pretty good job of allowing us to write tests for error conditions that the code generator could run into.
That means the main outstanding thing for this issue is to test against multiple postgres versions. Docker should help with that.
from pggen.
Closing in favor of #14 which is more focused
from pggen.
Related Issues (20)
- add a ConnPGClient
- build and host godocs for pggen HOT 1
- write a quickstart tutorial
- maintain a cache of prepared statements HOT 1
- improve debugability when the generated code is invalid go
- expose a Close method on the Generator
- pggen generates the wrong argument type for intervals
- internal error if you don't provide an output file name
- add a cost_threshold global configuration option
- drop prepaired function support
- Get pggen ready for an open source release.
- switch over to jackc/pgx
- make it easier to run pggen HOT 1
- pggen generates colliding names when a table has two foreign keys pointing to a table
- Some error messages are swallowed on failed inserts HOT 1
- Make dynamic SQL a little easier
- Is it possible to set return type to slice of pointers HOT 8
- Allow control of nullability for argument types HOT 2
- New versions of git break the docker tests
- Add support for adding comments to generated statements
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pggen.