Refactor: 统一配置类
This commit is contained in:
@@ -1,7 +1,20 @@
|
||||
package neo4j
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"testing"
|
||||
|
||||
func TestDoConnect(t *testing.T){
|
||||
doConnect()
|
||||
}
|
||||
"knowledge-graph-backend/config"
|
||||
)
|
||||
|
||||
func TestDoConnect(t *testing.T) {
|
||||
cnf, err := config.Load()
|
||||
if err != nil {
|
||||
t.Errorf("[cnf]: %v", err)
|
||||
}
|
||||
cfg := config.Neo4jConfig{
|
||||
URI: cnf.Neo4j.URI,
|
||||
Username: cnf.Neo4j.Username,
|
||||
Password: cnf.Neo4j.Password,
|
||||
}
|
||||
DoConnect(cfg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user