2023-07-26 00:42:12 -06:00
|
|
|
package graphvent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestNodeDB(t *testing.T) {
|
2023-07-28 00:04:18 -06:00
|
|
|
ctx := logTestContext(t, []string{"db"})
|
2023-07-26 00:42:12 -06:00
|
|
|
node_type := NodeType("test")
|
2023-07-27 01:30:32 -06:00
|
|
|
err := ctx.RegisterNodeType(node_type, []ExtType{GroupExtType})
|
2023-07-26 00:42:12 -06:00
|
|
|
fatalErr(t, err)
|
2023-07-27 01:30:32 -06:00
|
|
|
|
2023-07-27 15:27:14 -06:00
|
|
|
node := NewNode(ctx, RandID(), node_type, nil, NewGroupExt(nil))
|
2023-07-26 00:42:12 -06:00
|
|
|
|
2023-07-26 15:08:14 -06:00
|
|
|
ctx.Nodes = NodeMap{}
|
2023-07-28 00:04:18 -06:00
|
|
|
_, err = ctx.GetNode(node.ID)
|
2023-07-26 00:42:12 -06:00
|
|
|
fatalErr(t, err)
|
|
|
|
}
|