mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03:00
Stop Viper from leaking across many of the tests (now tests pass regardless of order tested)
This commit is contained in:
parent
599d1b9786
commit
a584ff207b
15 changed files with 223 additions and 101 deletions
|
@ -431,6 +431,8 @@ func TestExists(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestAbsPathify(t *testing.T) {
|
||||
defer viper.Reset()
|
||||
|
||||
type test struct {
|
||||
inPath, workingDir, expected string
|
||||
}
|
||||
|
@ -450,6 +452,7 @@ func TestAbsPathify(t *testing.T) {
|
|||
}
|
||||
|
||||
for i, d := range data {
|
||||
viper.Reset()
|
||||
// todo see comment in AbsPathify
|
||||
viper.Set("WorkingDir", d.workingDir)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue