REST API: add events search

This commit is contained in:
Nicola Murino
2021-10-23 15:47:21 +02:00
parent 97d0a48557
commit 74fc3aaf37
25 changed files with 1708 additions and 55 deletions

View File

@@ -33,6 +33,7 @@ import (
"github.com/drakkan/sftpgo/v2/dataprovider"
"github.com/drakkan/sftpgo/v2/kms"
"github.com/drakkan/sftpgo/v2/sdk"
"github.com/drakkan/sftpgo/v2/sdk/plugin"
"github.com/drakkan/sftpgo/v2/util"
"github.com/drakkan/sftpgo/v2/vfs"
)
@@ -305,6 +306,8 @@ func TestGetRespStatus(t *testing.T) {
err = fmt.Errorf("generic error")
respStatus = getRespStatus(err)
assert.Equal(t, http.StatusInternalServerError, respStatus)
respStatus = getRespStatus(plugin.ErrNoSearcher)
assert.Equal(t, http.StatusNotImplemented, respStatus)
}
func TestMappedStatusCode(t *testing.T) {