[_]
This commit is contained in:
parent
c0ff564fe8
commit
dc08580eb0
1 changed files with 22 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package connector
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
|
@ -14,8 +15,26 @@ func TestLoad(t *testing.T) {
|
|||
test.Prepare(t, config.Conf)
|
||||
defer test.Clean()
|
||||
|
||||
Load(config.Conf)
|
||||
utils.Dump(config.Conf)
|
||||
err := Load(config.Conf)
|
||||
utils.Dump(config.Conf, "ERROR---", err, "-- END ERROR---")
|
||||
utils.Dump(
|
||||
"REDIS---",
|
||||
os.Getenv("REDIS_TEST_HOST"),
|
||||
os.Getenv("REDIS_TEST_PORT"),
|
||||
os.Getenv("REDIS_TEST_USER"),
|
||||
os.Getenv("REDIS_TEST_PASS"),
|
||||
"-- END REDIS---",
|
||||
)
|
||||
|
||||
utils.Dump(
|
||||
"SQLITE---",
|
||||
os.Getenv("SQLITE_DB"),
|
||||
"-- END SQLITE---",
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
check(t)
|
||||
}
|
||||
|
||||
|
|
@ -26,6 +45,7 @@ func check(t *testing.T) {
|
|||
}
|
||||
|
||||
utils.Dump(ids)
|
||||
|
||||
assert.True(t, ids["mongo"])
|
||||
assert.True(t, ids["mysql"])
|
||||
assert.True(t, ids["redis"])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue