[日志审计]增加删除、清理和别的一些设置

This commit is contained in:
刘祥超
2020-12-02 20:31:42 +08:00
parent 86fef9153a
commit 81681f415d
28 changed files with 485 additions and 78 deletions

View File

@@ -0,0 +1,32 @@
package configloaders
import (
_ "github.com/iwind/TeaGo/bootstrap"
"testing"
"time"
)
func TestLoadSecurityConfig(t *testing.T) {
for i := 0; i < 10; i++ {
before := time.Now()
config, err := LoadSecurityConfig()
if err != nil {
t.Fatal(err)
}
t.Log(time.Since(before).Seconds()*1000, "ms")
t.Logf("%p", config)
}
}
func TestLoadSecurityConfig2(t *testing.T) {
for i := 0; i < 10; i++ {
config, err := LoadSecurityConfig()
if err != nil {
t.Fatal(err)
}
if i == 0 {
config.Frame = "DENY"
}
t.Log(config.Frame)
}
}