diff --git a/connector/connector_test.go b/connector/connector_test.go index fa41d2b8..0224aaf7 100644 --- a/connector/connector_test.go +++ b/connector/connector_test.go @@ -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"])