Skip to content

Commit b7a8410

Browse files
Kump3rCI Bot
authored andcommitted
Addapt cloudfoundry_test.go acceptance tests for CF API v3
Signed-off-by: Kump3r <tonevkalin@gmail.com>
1 parent 2851935 commit b7a8410

2 files changed

Lines changed: 322 additions & 48 deletions

File tree

connector/cloudfoundry/cloudfoundry.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,27 +47,27 @@ type Config struct {
4747

4848
type ccResponse struct {
4949
Pagination pagination `json:"pagination"`
50-
Resources []resource `json:"resources"`
50+
Resources []resource `json:"resources"`
5151
}
5252

5353
type pagination struct {
54-
Next href `json:"next"`
54+
Next href `json:"next"`
5555
}
5656

5757
type href struct {
58-
Href string `json:"href"`
58+
Href string `json:"href"`
5959
}
6060

6161
type resource struct {
62-
GUID string `json:"guid"`
63-
Name string `json:"name,omitempty"`
64-
Type string `json:"type,omitempty"`
62+
GUID string `json:"guid"`
63+
Name string `json:"name,omitempty"`
64+
Type string `json:"type,omitempty"`
6565
Relationships relationships `json:"relationships"`
6666
}
6767

6868
type relationships struct {
6969
Organization relOrganization `json:"organization"`
70-
Space relSpace `json:"space"`
70+
Space relSpace `json:"space"`
7171
}
7272

7373
type relOrganization struct {
@@ -82,7 +82,6 @@ type data struct {
8282
GUID string `json:"guid"`
8383
}
8484

85-
8685
type space struct {
8786
Name string
8887
GUID string
@@ -379,8 +378,8 @@ func (c *cloudfoundryConnector) HandleCallback(s connector.Scopes, r *http.Reque
379378
identity.EmailVerified, _ = userInfoResult["email_verified"].(bool)
380379

381380
var (
382-
orgsPath = fmt.Sprintf("/v3/organizations")
383-
spacesPath = fmt.Sprintf("/v3/spaces")
381+
orgsPath = "/v3/organizations"
382+
spacesPath = "/v3/spaces"
384383
userOrgsSpacesPath = fmt.Sprintf("/v3/roles?user_guids=%s&types=space_developer,space_manager,space_auditor,organization_user", identity.UserID)
385384
)
386385

0 commit comments

Comments
 (0)