Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
go-orusapi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orus-io
go-orusapi
Commits
5746457e68bc
Commit
5746457e68bc
authored
3 years ago
by
Christophe de Vienne
Browse files
Options
Downloads
Patches
Plain Diff
database test functions now also accept benchmarks
parent
7908dfbcac1f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
database/test.go
+2
-2
2 additions, 2 deletions
database/test.go
with
2 additions
and
2 deletions
database/test.go
+
2
−
2
View file @
5746457e
...
...
@@ -16,7 +16,7 @@
const
dbLockID
=
15104
func
clearDB
(
t
*
testing
.
T
,
c
*
sqlx
.
Conn
,
dsn
string
)
{
func
clearDB
(
t
testing
.
T
B
,
c
*
sqlx
.
Conn
,
dsn
string
)
{
// Drop all tables, and reinit
if
_
,
err
:=
c
.
ExecContext
(
context
.
Background
(),
"DROP SCHEMA IF EXISTS public CASCADE"
);
err
!=
nil
{
t
.
Fatal
(
err
)
...
...
@@ -72,7 +72,7 @@
// GetTestDB creates a db and returns it. It must be closed within the test.
// If it fails, t.Fatal() is called
func
GetTestDB
(
t
*
testing
.
T
,
sourceDriver
source
.
Driver
)
*
TestDB
{
func
GetTestDB
(
t
testing
.
T
B
,
sourceDriver
source
.
Driver
)
*
TestDB
{
var
success
bool
dsn
:=
os
.
Getenv
(
"TEST_DB_DSN"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment