mirror of
https://github.com/go-gitea/gitea
synced 2025-08-24 18:38:28 +00:00
go1.16 (#14783)
This commit is contained in:
10
vendor/github.com/go-testfixtures/testfixtures/v3/README.md
generated
vendored
10
vendor/github.com/go-testfixtures/testfixtures/v3/README.md
generated
vendored
@@ -90,6 +90,13 @@ databases.
|
||||
post: "..."
|
||||
```
|
||||
|
||||
Binary columns can be represented as hexadecimal strings (should start with `0x`):
|
||||
|
||||
```yaml
|
||||
- id: 1
|
||||
binary_column: 0x1234567890abcdef
|
||||
```
|
||||
|
||||
If you need to write raw SQL, probably to call a function, prefix the value
|
||||
of the column with `RAW=`:
|
||||
|
||||
@@ -129,7 +136,7 @@ func TestMain(m *testing.M) {
|
||||
...
|
||||
}
|
||||
|
||||
fixtures, err := testfixtures.New(
|
||||
fixtures, err = testfixtures.New(
|
||||
testfixtures.Database(db), // You database connection
|
||||
testfixtures.Dialect("postgres"), // Available: "postgresql", "timescaledb", "mysql", "mariadb", "sqlite" and "sqlserver"
|
||||
testfixtures.Directory("testdata/fixtures"), // the directory containing the YAML files
|
||||
@@ -497,6 +504,7 @@ unit test database code without having to connect to a real database
|
||||
- [dbcleaner][dbcleaner] - Clean database for testing, inspired by
|
||||
database_cleaner for Ruby
|
||||
|
||||
[doc]: https://pkg.go.dev/github.com/go-testfixtures/testfixtures/v3?tab=doc
|
||||
[railstests]: http://guides.rubyonrails.org/testing.html#the-test-database
|
||||
[gotxdb]: https://github.com/DATA-DOG/go-txdb
|
||||
[gosqlmock]: https://github.com/DATA-DOG/go-sqlmock
|
||||
|
Reference in New Issue
Block a user