diff --git a/projects.go b/projects.go index 17afaff..86ed285 100644 --- a/projects.go +++ b/projects.go @@ -158,7 +158,7 @@ type ConfigInput struct { UseSignedOffBy string `json:"use_signed_off_by,omitempty"` CreateNewChangeForAllNotInTarget string `json:"create_new_change_for_all_not_in_target,omitempty"` RequireChangeID string `json:"require_change_id,omitempty"` - MaxObjectSizeLimit MaxObjectSizeLimitInfo `json:"max_object_size_limit,omitempty"` + MaxObjectSizeLimit interface{} `json:"max_object_size_limit,omitempty"` SubmitType string `json:"submit_type,omitempty"` State string `json:"state,omitempty"` PluginConfigValues map[string]map[string]string `json:"plugin_config_values,omitempty"` diff --git a/projects_test.go b/projects_test.go index d223c9f..5f548f8 100644 --- a/projects_test.go +++ b/projects_test.go @@ -265,3 +265,28 @@ func TestProjectsService_GetBranch(t *testing.T) { } } } + +func TestProjectsService_SetConfig(t *testing.T) { + setup() + defer teardown() + + var configInput gerrit.ConfigInput + + // test server url + instance := "https://gerrit-test.uniontech.com/" + client, err := gerrit.NewClient(instance, nil) + if err != nil { + panic(err) + } + + // login username and password + client.Authentication.SetBasicAuth("", "") + + configInput.Description = "test change description" + + _, _, err = client.Projects.SetConfig("my-test", &configInput) + if err != nil { + t.Errorf("Projects.SetConfig returned error: %v", err) + } + +}