sebastianosinski / grdbsnapshottesting Goto Github PK
View Code? Open in Web Editor NEWSnapshot tests for GRDB database migrations
License: MIT License
Snapshot tests for GRDB database migrations
License: MIT License
hello @SebastianOsinski,
I just wanted to tell that https://github.com/groue/GRDBSnapshotTesting is now an "official" member of the GRDB family, expected to evolve and be maintained in the long run along with GRDB.
I also wanted to thank you for your excellent idea of providing convenience methods for copying databases from test fixtures. They are now provided by GRDB itself: DatabaseQueue.inMemoryCopy(fromPath:configuration:)
.
That's it :-)
Hello @SebastianOsinski,
Thanks for GRDBSnapshotTesting, it works like a charm ๐ I wanted to suggest a change (two, actually).
Database snapshots currently contain internal SQLite and GRDB objects:
======== TABLES ========
CREATE TABLE grdb_migrations (
identifier TEXT NOT NULL PRIMARY KEY
)
CREATE TABLE sqlite_sequence(
name
seq
)
======== DATA ========
## grdb_migrations
...
## sqlite_sequence
...
I'm wondering if those objects are useful for the tests.
As internal objects, they can change, without notice, from one version of SQLite or GRDB to another.
I'm also worrying that those objects make it difficult to generate snapshots without relying of the initial snapshot generation (*).
If you agree that we could do without them, then why not exclude them from the snapshot? It is easy to do so: all SQLite Internal Schema Objects have the sqlite_
prefix. All GRDB internal objects have the grdb_
prefix (not publicly documented, but I know it firsthand ;-)).
(*) On that second question, I'm also wondering if sorting objects by name wouldn't be a net improvement. Sorting objects by name would have another benefit: by easing the comparison between two subsequent schemas with a simple diff, it helps deciding if a snapshot is correct or not.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.