From 0c52ba8576f6b67adbd5128e51c7effc067be7c6 Mon Sep 17 00:00:00 2001 From: Emile Date: Sat, 16 Feb 2019 19:56:37 +0100 Subject: deleting all the nodes before inserting new stars in the tree --- db_actions_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/db_actions_test.go b/db_actions_test.go index 230093a..07dd2d3 100644 --- a/db_actions_test.go +++ b/db_actions_test.go @@ -144,6 +144,13 @@ func TestInsertStar(t *testing.T) { db = ConnectToDB() db.SetMaxOpenConns(75) + // delete all preexisting stars and nodes + DeleteAllStars(db) + DeleteAllNodes(db) + + // create a new tree with a width of 1000 + NewTree(db, 1000) + type args struct { database *sql.DB star structs.Star2D -- cgit 1.4.1