mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
hugolib: Disable shaky leaktest on CI
This commit is contained in:
parent
95386544e8
commit
5103935ae8
2 changed files with 8 additions and 2 deletions
|
@ -392,8 +392,10 @@ func doTestMultiSitesBuild(t *testing.T, configTemplate, configSuffix string) {
|
|||
|
||||
func TestMultiSitesRebuild(t *testing.T) {
|
||||
// t.Parallel() not supported, see https://github.com/fortytw2/leaktest/issues/4
|
||||
defer leaktest.CheckTimeout(t, 30*time.Second)()
|
||||
|
||||
// This leaktest seems to be a little bit shaky on Travis.
|
||||
if !isCI() {
|
||||
defer leaktest.CheckTimeout(t, 30*time.Second)()
|
||||
}
|
||||
siteConfig := testSiteConfig{Fs: afero.NewMemMapFs(), DefaultContentLanguage: "fr", DefaultContentLanguageInSubdir: true}
|
||||
sites := createMultiTestSites(t, siteConfig, multiSiteTOMLConfigTemplate)
|
||||
fs := sites.Fs
|
||||
|
|
|
@ -208,3 +208,7 @@ func writeSourcesToSource(t *testing.T, base string, fs *hugofs.Fs, sources ...s
|
|||
writeSource(t, fs, filepath.Join(base, src.Name), string(src.Content))
|
||||
}
|
||||
}
|
||||
|
||||
func isCI() bool {
|
||||
return os.Getenv("CI") != ""
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue