backend: fix linter warnings
This commit is contained in:
parent
a27b7f1370
commit
25a0be7f26
7 changed files with 64 additions and 64 deletions
|
@ -9,69 +9,69 @@ import (
|
|||
var configTests = []test.ConfigTestData[Config]{
|
||||
// first form, user specified sftp://user@host/dir
|
||||
{
|
||||
"sftp://user@host/dir/subdir",
|
||||
Config{User: "user", Host: "host", Path: "dir/subdir", Connections: 5},
|
||||
S: "sftp://user@host/dir/subdir",
|
||||
Cfg: Config{User: "user", Host: "host", Path: "dir/subdir", Connections: 5},
|
||||
},
|
||||
{
|
||||
"sftp://host/dir/subdir",
|
||||
Config{Host: "host", Path: "dir/subdir", Connections: 5},
|
||||
S: "sftp://host/dir/subdir",
|
||||
Cfg: Config{Host: "host", Path: "dir/subdir", Connections: 5},
|
||||
},
|
||||
{
|
||||
"sftp://host//dir/subdir",
|
||||
Config{Host: "host", Path: "/dir/subdir", Connections: 5},
|
||||
S: "sftp://host//dir/subdir",
|
||||
Cfg: Config{Host: "host", Path: "/dir/subdir", Connections: 5},
|
||||
},
|
||||
{
|
||||
"sftp://host:10022//dir/subdir",
|
||||
Config{Host: "host", Port: "10022", Path: "/dir/subdir", Connections: 5},
|
||||
S: "sftp://host:10022//dir/subdir",
|
||||
Cfg: Config{Host: "host", Port: "10022", Path: "/dir/subdir", Connections: 5},
|
||||
},
|
||||
{
|
||||
"sftp://user@host:10022//dir/subdir",
|
||||
Config{User: "user", Host: "host", Port: "10022", Path: "/dir/subdir", Connections: 5},
|
||||
S: "sftp://user@host:10022//dir/subdir",
|
||||
Cfg: Config{User: "user", Host: "host", Port: "10022", Path: "/dir/subdir", Connections: 5},
|
||||
},
|
||||
{
|
||||
"sftp://user@host/dir/subdir/../other",
|
||||
Config{User: "user", Host: "host", Path: "dir/other", Connections: 5},
|
||||
S: "sftp://user@host/dir/subdir/../other",
|
||||
Cfg: Config{User: "user", Host: "host", Path: "dir/other", Connections: 5},
|
||||
},
|
||||
{
|
||||
"sftp://user@host/dir///subdir",
|
||||
Config{User: "user", Host: "host", Path: "dir/subdir", Connections: 5},
|
||||
S: "sftp://user@host/dir///subdir",
|
||||
Cfg: Config{User: "user", Host: "host", Path: "dir/subdir", Connections: 5},
|
||||
},
|
||||
|
||||
// IPv6 address.
|
||||
{
|
||||
"sftp://user@[::1]/dir",
|
||||
Config{User: "user", Host: "::1", Path: "dir", Connections: 5},
|
||||
S: "sftp://user@[::1]/dir",
|
||||
Cfg: Config{User: "user", Host: "::1", Path: "dir", Connections: 5},
|
||||
},
|
||||
// IPv6 address with port.
|
||||
{
|
||||
"sftp://user@[::1]:22/dir",
|
||||
Config{User: "user", Host: "::1", Port: "22", Path: "dir", Connections: 5},
|
||||
S: "sftp://user@[::1]:22/dir",
|
||||
Cfg: Config{User: "user", Host: "::1", Port: "22", Path: "dir", Connections: 5},
|
||||
},
|
||||
|
||||
// second form, user specified sftp:user@host:/dir
|
||||
{
|
||||
"sftp:user@host:/dir/subdir",
|
||||
Config{User: "user", Host: "host", Path: "/dir/subdir", Connections: 5},
|
||||
S: "sftp:user@host:/dir/subdir",
|
||||
Cfg: Config{User: "user", Host: "host", Path: "/dir/subdir", Connections: 5},
|
||||
},
|
||||
{
|
||||
"sftp:user@domain@host:/dir/subdir",
|
||||
Config{User: "user@domain", Host: "host", Path: "/dir/subdir", Connections: 5},
|
||||
S: "sftp:user@domain@host:/dir/subdir",
|
||||
Cfg: Config{User: "user@domain", Host: "host", Path: "/dir/subdir", Connections: 5},
|
||||
},
|
||||
{
|
||||
"sftp:host:../dir/subdir",
|
||||
Config{Host: "host", Path: "../dir/subdir", Connections: 5},
|
||||
S: "sftp:host:../dir/subdir",
|
||||
Cfg: Config{Host: "host", Path: "../dir/subdir", Connections: 5},
|
||||
},
|
||||
{
|
||||
"sftp:user@host:dir/subdir:suffix",
|
||||
Config{User: "user", Host: "host", Path: "dir/subdir:suffix", Connections: 5},
|
||||
S: "sftp:user@host:dir/subdir:suffix",
|
||||
Cfg: Config{User: "user", Host: "host", Path: "dir/subdir:suffix", Connections: 5},
|
||||
},
|
||||
{
|
||||
"sftp:user@host:dir/subdir/../other",
|
||||
Config{User: "user", Host: "host", Path: "dir/other", Connections: 5},
|
||||
S: "sftp:user@host:dir/subdir/../other",
|
||||
Cfg: Config{User: "user", Host: "host", Path: "dir/other", Connections: 5},
|
||||
},
|
||||
{
|
||||
"sftp:user@host:dir///subdir",
|
||||
Config{User: "user", Host: "host", Path: "dir/subdir", Connections: 5},
|
||||
S: "sftp:user@host:dir///subdir",
|
||||
Cfg: Config{User: "user", Host: "host", Path: "dir/subdir", Connections: 5},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue