mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-02 03:40:27 +08:00
34 lines
559 B
Go
34 lines
559 B
Go
package configloaders
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
_ "github.com/iwind/TeaGo/bootstrap"
|
|
)
|
|
|
|
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)
|
|
}
|
|
}
|