1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-19 17:53:16 +00:00

vendor: update all dependencies

This commit is contained in:
Nick Craig-Wood
2018-06-17 17:59:12 +01:00
parent 3f0789e2db
commit 08021c4636
2474 changed files with 435818 additions and 282709 deletions

View File

@@ -118,6 +118,50 @@ func TestExpand(t *testing.T) {
}
}
func TestResolveRelative(t *testing.T) {
resolveRelativeTests := []struct {
basestr string
relstr string
want string
}{
{
"http://www.golang.org/", "topics/myproject/mytopic",
"http://www.golang.org/topics/myproject/mytopic",
},
{
"http://www.golang.org/", "topics/{+myproject}/{release}:build:test:deploy",
"http://www.golang.org/topics/{+myproject}/{release}:build:test:deploy",
},
{
"https://www.googleapis.com/admin/reports/v1/", "/admin/reports_v1/channels/stop",
"https://www.googleapis.com/admin/reports_v1/channels/stop",
},
{
"https://www.googleapis.com/admin/directory/v1/", "customer/{customerId}/orgunits{/orgUnitPath*}",
"https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits{/orgUnitPath*}",
},
{
"https://www.googleapis.com/tagmanager/v2/", "accounts",
"https://www.googleapis.com/tagmanager/v2/accounts",
},
{
"https://www.googleapis.com/tagmanager/v2/", "{+parent}/workspaces",
"https://www.googleapis.com/tagmanager/v2/{+parent}/workspaces",
},
{
"https://www.googleapis.com/tagmanager/v2/", "{+path}:create_version",
"https://www.googleapis.com/tagmanager/v2/{+path}:create_version",
},
}
for i, test := range resolveRelativeTests {
got := ResolveRelative(test.basestr, test.relstr)
if got != test.want {
t.Errorf("got %q expected %q in test %d", got, test.want, i+1)
}
}
}
type CheckResponseTest struct {
in *http.Response
bodyText string