Skip to content

Commit

Permalink
Fix 'TestClient_getloginurl'
Browse files Browse the repository at this point in the history
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
  • Loading branch information
Didainius committed Aug 19, 2022
1 parent b47dac7 commit 897a7c0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion govcd/api_vcd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ func TestClient_getloginurl(t *testing.T) {
t.Fatalf("err: %s", err)
}

if client.sessionHREF.Path != "/api/sessions" {
if client.sessionHREF.Path != "/cloudapi/1.0.0/sessions" {
t.Fatalf("Getting LoginUrl failed, url: %s", client.sessionHREF.Path)
}
}
Expand Down
7 changes: 4 additions & 3 deletions govcd/api_vcd_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ import (
)

type VersionInfo struct {
Version string `xml:"Version"`
LoginUrl string `xml:"LoginUrl"`
Deprecated bool `xml:"deprecated,attr,omitempty"`
Version string `xml:"Version"`
LoginUrl string `xml:"LoginUrl"`
ProviderLoginUrl string `xml:"ProviderLoginUrl"`
Deprecated bool `xml:"deprecated,attr,omitempty"`
}

type VersionInfos []VersionInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@
<Version>34.0</Version>
<LoginUrl>https://192.168.1.109/api/sessions</LoginUrl>
</VersionInfo>
<VersionInfo deprecated="false">
<Version>35.0</Version>
<LoginUrl>https://192.168.1.109/api/sessions</LoginUrl>
</VersionInfo>
<VersionInfo deprecated="false">
<Version>35.0</Version>
<LoginUrl>https://192.168.1.109/api/sessions</LoginUrl>
</VersionInfo>
<VersionInfo deprecated="false">
<Version>36.0</Version>
<LoginUrl>https://192.168.1.109/cloudapi/1.0.0/sessions</LoginUrl>
<ProviderLoginUrl>https://192.168.1.109/cloudapi/1.0.0/sessions/provider</ProviderLoginUrl>
</VersionInfo>
<VersionInfo deprecated="true">
<Version>5.5</Version>
<LoginUrl>https://192.168.1.109/api/sessions</LoginUrl>
Expand Down

0 comments on commit 897a7c0

Please sign in to comment.