23 lines
387 B
Go
23 lines
387 B
Go
package neo4j
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"knowledge-graph-backend/config"
|
|
)
|
|
|
|
func TestNewDriver(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,
|
|
}
|
|
driver := NewDriver(cfg)
|
|
defer driver.Close(context.Background())
|
|
}
|