Modify: create Web Authn instance when needed

This commit is contained in:
HFO4
2020-02-23 15:50:41 +08:00
parent ce2a70df68
commit ef42ec3927
5 changed files with 34 additions and 35 deletions

View File

@@ -10,8 +10,7 @@ func TestInit(t *testing.T) {
asserts := assert.New(t)
cache.Set("setting_siteURL", "http://cloudreve.org", 0)
cache.Set("setting_siteName", "Cloudreve", 0)
asserts.NotPanics(func() {
Init()
})
asserts.NotNil(AuthnInstance)
res, err := NewAuthnInstance()
asserts.NotNil(res)
asserts.NoError(err)
}