mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
sftpd: remove folder_prefix
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -2109,29 +2109,6 @@ func newFakeListener(err error) net.Listener {
|
||||
}
|
||||
}
|
||||
|
||||
func TestFolderPrefix(t *testing.T) {
|
||||
c := Configuration{
|
||||
FolderPrefix: "files",
|
||||
}
|
||||
c.checkFolderPrefix()
|
||||
assert.Equal(t, "/files", c.FolderPrefix)
|
||||
c.FolderPrefix = ""
|
||||
c.checkFolderPrefix()
|
||||
assert.Empty(t, c.FolderPrefix)
|
||||
c.FolderPrefix = "/"
|
||||
c.checkFolderPrefix()
|
||||
assert.Empty(t, c.FolderPrefix)
|
||||
c.FolderPrefix = "/."
|
||||
c.checkFolderPrefix()
|
||||
assert.Empty(t, c.FolderPrefix)
|
||||
c.FolderPrefix = "."
|
||||
c.checkFolderPrefix()
|
||||
assert.Empty(t, c.FolderPrefix)
|
||||
c.FolderPrefix = ".."
|
||||
c.checkFolderPrefix()
|
||||
assert.Empty(t, c.FolderPrefix)
|
||||
}
|
||||
|
||||
func TestLoadRevokedUserCertsFile(t *testing.T) {
|
||||
r := revokedCertificates{
|
||||
certs: map[string]bool{},
|
||||
|
||||
Reference in New Issue
Block a user