mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 02:01:43 +03:00
cache: test for FTS bub with long description
This commit is contained in:
parent
32958b5ca1
commit
e985653701
20
cache/repo_cache_test.go
vendored
20
cache/repo_cache_test.go
vendored
@ -1,7 +1,9 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
@ -274,3 +276,21 @@ func checkBugPresence(t *testing.T, cache *RepoCache, bug *BugCache, presence bo
|
||||
require.Equal(t, bug, b)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLongDescription(t *testing.T) {
|
||||
// See https://github.com/MichaelMure/git-bug/issues/606
|
||||
|
||||
text := strings.Repeat("x", 65536)
|
||||
|
||||
repo := repository.CreateGoGitTestRepo(false)
|
||||
defer repository.CleanupTestRepos(repo)
|
||||
|
||||
backend, err := NewRepoCache(repo)
|
||||
require.NoError(t, err)
|
||||
|
||||
i, err := backend.NewIdentity("René Descartes", "rene@descartes.fr")
|
||||
require.NoError(t, err)
|
||||
|
||||
_, _, err = backend.NewBugRaw(i, time.Now().Unix(), text, text, nil, nil)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user