diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2024-01-07 19:05:19 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2024-01-07 19:05:19 -0500 |
| commit | 4c296d8dacdd03c68a09a2d10266f193d97f5f0e (patch) | |
| tree | 2689dab2c8ebe857eb11169d8f85eab3faf1f7d2 /internal/storage/dbtest | |
| parent | Move message normalization to create dirname to fs repo (diff) | |
| download | cli-4c296d8dacdd03c68a09a2d10266f193d97f5f0e.zip | |
Add shared test util package
Diffstat (limited to 'internal/storage/dbtest')
| -rw-r--r-- | internal/storage/dbtest/dbtest.go | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/internal/storage/dbtest/dbtest.go b/internal/storage/dbtest/dbtest.go deleted file mode 100644 index c53c04a..0000000 --- a/internal/storage/dbtest/dbtest.go +++ /dev/null @@ -1,24 +0,0 @@ -package dbtest - -import ( - "os" - "strconv" - - "github.com/eugenetriguba/bolt/internal/configloader" -) - -func NewTestConnectionConfig(driver string) (*configloader.ConnectionConfig, error) { - port, err := strconv.Atoi(os.Getenv("DB_PORT")) - if err != nil { - return nil, err - } - - return &configloader.ConnectionConfig{ - Driver: driver, - DBName: os.Getenv("DB_NAME"), - Host: os.Getenv("DB_HOST"), - Port: port, - User: os.Getenv("DB_USERNAME"), - Password: os.Getenv("DB_PASSWORD"), - }, nil -} |