Skip to content

Commit

Permalink
test: add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
huskar-t committed Nov 7, 2024
1 parent a96feb5 commit 8a82319
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions taosWS/connector_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package taosWS

import (
"context"
"database/sql"
"fmt"
"math/rand"
Expand Down Expand Up @@ -456,3 +457,14 @@ func TestBatch(t *testing.T) {
})
}
}

func TestConnect(t *testing.T) {
conn := connector{
cfg: &config{},
}
db, err := conn.Connect(context.Background())
assert.NoError(t, err)
db.Close()
driver := conn.Driver()
assert.Equal(t, &TDengineDriver{}, driver)
}

0 comments on commit 8a82319

Please sign in to comment.