Isolate test state and paint full frame
This commit is contained in:
@@ -30,6 +30,20 @@ import (
|
||||
"git.julianfamily.org/keepassgo/webdav"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
stateDir, err := os.MkdirTemp("", "keepassgo-test-state-")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := os.Setenv("KEEPASSGO_STATE_DIR", stateDir); err != nil {
|
||||
_ = os.RemoveAll(stateDir)
|
||||
panic(err)
|
||||
}
|
||||
code := m.Run()
|
||||
_ = os.RemoveAll(stateDir)
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
func TestUIFiltersUsingVaultModelPathsAndSearch(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user