Skip to content

Commit

Permalink
APOI-11568: remove list_group_properties from v3.5 (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
grz-gajda authored Oct 26, 2022
1 parent f74f978 commit 19d6a43
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
11 changes: 0 additions & 11 deletions configuration/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,6 @@ func (a *API) ListLicenseProperties(namespacePrefix, namePrefix string) (Propert
return resp, err
}

// ListGroupProperties returns the properties set within a group.
func (a *API) ListGroupProperties(groupID uint, namespacePrefix, namePrefix string) (Properties, error) {
var resp Properties
err := a.Call("list_group_properties", &listGroupPropertiesRequest{
ID: groupID,
NamespacePrefix: namespacePrefix,
NamePrefix: namePrefix,
}, &resp)
return resp, err
}

// ListWebhookNames returns list of webhooks available in given API version.
func (a *API) ListWebhookNames(version string) ([]*WebhookData, error) {
var resp []*WebhookData
Expand Down
27 changes: 0 additions & 27 deletions configuration/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ var mockedResponses = map[string]string{
"string_property": "string value"
}
}`,
"list_group_properties": `{
"0805e283233042b37f460ed8fbf22160": {
"string_property": "string value"
}
}`,
"create_agent": `{
"id": "smith@example.com"
}`,
Expand Down Expand Up @@ -647,28 +642,6 @@ func TestListLicensePropertiesShouldReturnDataReceivedFromConfApi(t *testing.T)
}
}

func TestListGroupPropertiesShouldReturnDataReceivedFromConfApi(t *testing.T) {
client := NewTestClient(createMockedResponder(t, "list_group_properties"))

api, err := configuration.NewAPI(stubTokenGetter, client, "client_id")
if err != nil {
t.Error("API creation failed")
}

resp, rErr := api.ListGroupProperties(0, "", "")
if rErr != nil {
t.Errorf("ListGroupProperties failed: %v", rErr)
}

if len(resp) != 1 {
t.Errorf("Invalid group properties: %v", resp)
}

if resp["0805e283233042b37f460ed8fbf22160"]["string_property"] != "string value" {
t.Errorf("Invalid group property 0805e283233042b37f460ed8fbf22160.string_property: %v", resp["0805e283233042b37f460ed8fbf22160"]["string_property"])
}
}

func TestCreateAgentShouldReturnDataReceivedFromConfApi(t *testing.T) {
client := NewTestClient(createMockedResponder(t, "create_agent"))

Expand Down

0 comments on commit 19d6a43

Please sign in to comment.