Skip to content

Commit bf8e901

Browse files
author
kuba--
committed
Add integration test
Signed-off-by: kuba-- <[email protected]>
1 parent 96bc5bf commit bf8e901

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

integration_test.go

+19
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,25 @@ func TestIntegration(t *testing.T) {
243243
{"go/example.go", int32(1)},
244244
},
245245
},
246+
{
247+
`
248+
SELECT language, COUNT(repository_id) AS repository_count
249+
FROM (
250+
SELECT DISTINCT r.repository_id, LANGUAGE(t.tree_entry_name, b.blob_content) AS language
251+
FROM refs r
252+
JOIN commits c ON r.commit_hash = c.commit_hash
253+
NATURAL JOIN commit_trees
254+
NATURAL JOIN tree_entries t
255+
NATURAL JOIN blobs b
256+
WHERE language IS NOT NULL
257+
) AS q1
258+
GROUP BY language
259+
ORDER BY repository_count DESC
260+
`,
261+
[]sql.Row{
262+
{"Text", int32(1)},
263+
},
264+
},
246265
}
247266

248267
runTests := func(t *testing.T) {

0 commit comments

Comments
 (0)