MCPcopy Index your code
hub / github.com/dosco/graphjin / assertServiceCount

Function assertServiceCount

serv/codesql_test.go:789–802  ·  view source on GitHub ↗
(t *testing.T, s *graphjinService, dbName, query string, want int)

Source from the content-addressed store, hash-verified

787}
788
789func assertServiceCount(t *testing.T, s *graphjinService, dbName, query string, want int) {
790 t.Helper()
791 db := s.dbs[dbName]
792 if db == nil {
793 t.Fatalf("database %q not connected", dbName)
794 }
795 var got int
796 if err := db.QueryRow(query).Scan(&got); err != nil {
797 t.Fatalf("query failed: %v", err)
798 }
799 if got != want {
800 t.Fatalf("count = %d, want %d", got, want)
801 }
802}
803
804func assertGraphJinTable(t *testing.T, s *graphjinService, dbName, tableName string) {
805 t.Helper()

Calls 1

ScanMethod · 0.65

Tested by

no test coverage detected