Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 1.9% dependent packages on proxy.golang.org
Top 2.3% dependent repos on proxy.golang.org

proxy.golang.org : github.com/godogx/dbsteps

Package dbsteps provides godog steps to handle database state. Databases instances should be configured with Manager.Instances. Table mapper allows customizing decoding string values from godog table cells into Go row structures and back. Delete all rows from table. Populate rows in a database with a gherkin table. Assert rows existence in a database. For each row in gherkin table DB is queried to find a row with WHERE condition that includes provided column values. If a column has NULL value, it is excluded from WHERE condition. Column can contain variable (any unique string starting with $ or other prefix configured with Manager.VarPrefix). If variable has not yet been populated, it is excluded from WHERE condition and populated with value received from database. When this variable is used in next steps, it replaces the value of column with value of variable. Variables can help to assert consistency of dynamic data, for example variable can be populated as ID of one entity and then checked as foreign key value of another entity. This can be especially helpful in cases of UUIDs. If column value represents JSON array or object it is excluded from WHERE condition, value assertion is done by comparing Go value mapped from database row field with Go value mapped from gherkin table cell. Rows can be also loaded from CSV file. It is possible to check table contents exhaustively by adding "only" to step statement. Such assertion will also make sure that total number of rows in database table matches number of rows in gherkin table. Rows can be also loaded from CSV file. Assert no rows exist in a database.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/godogx/dbsteps
License: MIT
Latest release: over 2 years ago
First release: over 2 years ago
Namespace: github.com/godogx
Dependent packages: 9
Dependent repositories: 5
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 16 days ago

    Loading...
    Readme
    Loading...