Simplify API endpoints; add endpoint tests

This commit is contained in:
binwiederhier 2022-12-28 19:55:11 -05:00
parent 7ca9afad57
commit 367d024a2d
6 changed files with 113 additions and 75 deletions

View file

@ -1446,6 +1446,12 @@ func newTestConfig(t *testing.T) *Config {
return conf
}
func newTestConfigWithUsers(t *testing.T) *Config {
conf := newTestConfig(t)
conf.AuthFile = filepath.Join(t.TempDir(), "user.db")
return conf
}
func newTestServer(t *testing.T, config *Config) *Server {
server, err := New(config)
if err != nil {