From ea4c139cd2f7e5174627a40aa8a9973fabf508ff Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Sat, 30 May 2020 10:46:15 +0300 Subject: Change language statistics to save size instead of percentage (#11681) * Change language statistics to save size instead of percentage in database Co-Authored-By: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> * Do not exclude if only language * Fix edge cases with special langauges Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> --- modules/indexer/stats/indexer_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/indexer') diff --git a/modules/indexer/stats/indexer_test.go b/modules/indexer/stats/indexer_test.go index 29d0f6dbe4..b60c6d9bb4 100644 --- a/modules/indexer/stats/indexer_test.go +++ b/modules/indexer/stats/indexer_test.go @@ -34,6 +34,9 @@ func TestRepoStatsIndex(t *testing.T) { repo, err := models.GetRepositoryByID(1) assert.NoError(t, err) + status, err := repo.GetIndexerStatus(models.RepoIndexerTypeStats) + assert.NoError(t, err) + assert.Equal(t, "65f1bf27bc3bf70f64657658635e66094edbcb4d", status.CommitSha) langs, err := repo.GetTopLanguageStats(5) assert.NoError(t, err) assert.Len(t, langs, 1) -- cgit v1.2.3