From b0ffb2b47cd182166d0fa8deb28ad7f8a985a451 Mon Sep 17 00:00:00 2001 From: Peter Harasztia Date: Mon, 18 Nov 2024 15:15:34 +0100 Subject: [PATCH 1/3] fix(partner center sell): remove not needed filed and fix for supportedAttributes Signed-off-by: Peter Harasztia --- go.mod | 2 +- partnercentersellv1/partner_center_sell_v1.go | 25 ++----- .../partner_center_sell_v1_test.go | 66 +++++++------------ 3 files changed, 33 insertions(+), 60 deletions(-) diff --git a/go.mod b/go.mod index 1114eeda..c66235e5 100644 --- a/go.mod +++ b/go.mod @@ -36,4 +36,4 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect -) \ No newline at end of file +) diff --git a/partnercentersellv1/partner_center_sell_v1.go b/partnercentersellv1/partner_center_sell_v1.go index 901737cd..7266f8dd 100644 --- a/partnercentersellv1/partner_center_sell_v1.go +++ b/partnercentersellv1/partner_center_sell_v1.go @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902 + * IBM OpenAPI SDK Code Generator Version: 3.96.1-5136e54a-20241108-203028 */ // Package partnercentersellv1 : Operations and models for the PartnerCenterSellV1 service @@ -42,7 +42,7 @@ type PartnerCenterSellV1 struct { } // DefaultServiceURL is the default URL to make service requests to. -const DefaultServiceURL = "https://product-lifecycle.cloud.ibm.com/openapi/v1" +const DefaultServiceURL = "http://localhost:5005/openapi/v1" // DefaultServiceName is the default key used to find external configuration information. const DefaultServiceName = "partner_center_sell" @@ -8971,7 +8971,7 @@ type SupportedAttributesOptions struct { Hidden *bool `json:"hidden,omitempty"` // The list of supported patterns. - SupportedAttributes []string `json:"supported_attributes,omitempty"` + SupportedPatterns []string `json:"supported_patterns,omitempty"` // The list of policy types. PolicyTypes []string `json:"policy_types,omitempty"` @@ -9017,9 +9017,9 @@ func UnmarshalSupportedAttributesOptions(m map[string]json.RawMessage, result in err = core.SDKErrorf(err, "", "hidden-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "supported_attributes", &obj.SupportedAttributes) + err = core.UnmarshalPrimitive(m, "supported_patterns", &obj.SupportedPatterns) if err != nil { - err = core.SDKErrorf(err, "", "supported_attributes-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "supported_patterns-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "policy_types", &obj.PolicyTypes) @@ -9060,8 +9060,8 @@ func (supportedAttributesOptions *SupportedAttributesOptions) asPatch() (_patch if !core.IsNil(supportedAttributesOptions.Hidden) { _patch["hidden"] = supportedAttributesOptions.Hidden } - if !core.IsNil(supportedAttributesOptions.SupportedAttributes) { - _patch["supported_attributes"] = supportedAttributesOptions.SupportedAttributes + if !core.IsNil(supportedAttributesOptions.SupportedPatterns) { + _patch["supported_patterns"] = supportedAttributesOptions.SupportedPatterns } if !core.IsNil(supportedAttributesOptions.PolicyTypes) { _patch["policy_types"] = supportedAttributesOptions.PolicyTypes @@ -9193,9 +9193,6 @@ type SupportedRoleOptions struct { // Optional opt-in to require access control on the role. AccessPolicy *bool `json:"access_policy" validate:"required"` - // Additional properties for access policy. - AdditionalPropertiesForAccessPolicy map[string]string `json:"additional_properties_for_access_policy,omitempty"` - // Optional opt-in to require checking policy type when applying the role. PolicyType []string `json:"policy_type,omitempty"` @@ -9237,11 +9234,6 @@ func UnmarshalSupportedRoleOptions(m map[string]json.RawMessage, result interfac err = core.SDKErrorf(err, "", "access_policy-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "additional_properties_for_access_policy", &obj.AdditionalPropertiesForAccessPolicy) - if err != nil { - err = core.SDKErrorf(err, "", "additional_properties_for_access_policy-error", common.GetComponentInfo()) - return - } err = core.UnmarshalPrimitive(m, "policy_type", &obj.PolicyType) if err != nil { err = core.SDKErrorf(err, "", "policy_type-error", common.GetComponentInfo()) @@ -9262,9 +9254,6 @@ func (supportedRoleOptions *SupportedRoleOptions) asPatch() (_patch map[string]i if !core.IsNil(supportedRoleOptions.AccessPolicy) { _patch["access_policy"] = supportedRoleOptions.AccessPolicy } - if !core.IsNil(supportedRoleOptions.AdditionalPropertiesForAccessPolicy) { - _patch["additional_properties_for_access_policy"] = supportedRoleOptions.AdditionalPropertiesForAccessPolicy - } if !core.IsNil(supportedRoleOptions.PolicyType) { _patch["policy_type"] = supportedRoleOptions.PolicyType } diff --git a/partnercentersellv1/partner_center_sell_v1_test.go b/partnercentersellv1/partner_center_sell_v1_test.go index c7695f42..a7e2dbe5 100644 --- a/partnercentersellv1/partner_center_sell_v1_test.go +++ b/partnercentersellv1/partner_center_sell_v1_test.go @@ -68,14 +68,13 @@ var _ = Describe(`PartnerCenterSellV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "PARTNER_CENTER_SELL_URL": "https://partnercentersellv1/api", + "PARTNER_CENTER_SELL_URL": "https://partnercentersellv1/api", "PARTNER_CENTER_SELL_AUTH_TYPE": "noauth", } It(`Create service client using external config successfully`, func() { SetTestEnvironment(testEnvironment) - partnerCenterSellService, serviceErr := partnercentersellv1.NewPartnerCenterSellV1UsingExternalConfig(&partnercentersellv1.PartnerCenterSellV1Options{ - }) + partnerCenterSellService, serviceErr := partnercentersellv1.NewPartnerCenterSellV1UsingExternalConfig(&partnercentersellv1.PartnerCenterSellV1Options{}) Expect(partnerCenterSellService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) ClearTestEnvironment(testEnvironment) @@ -104,8 +103,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { }) It(`Create service client using external config and set url programatically successfully`, func() { SetTestEnvironment(testEnvironment) - partnerCenterSellService, serviceErr := partnercentersellv1.NewPartnerCenterSellV1UsingExternalConfig(&partnercentersellv1.PartnerCenterSellV1Options{ - }) + partnerCenterSellService, serviceErr := partnercentersellv1.NewPartnerCenterSellV1UsingExternalConfig(&partnercentersellv1.PartnerCenterSellV1Options{}) err := partnerCenterSellService.SetServiceURL("https://testService/api") Expect(err).To(BeNil()) Expect(partnerCenterSellService).ToNot(BeNil()) @@ -123,13 +121,12 @@ var _ = Describe(`PartnerCenterSellV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "PARTNER_CENTER_SELL_URL": "https://partnercentersellv1/api", + "PARTNER_CENTER_SELL_URL": "https://partnercentersellv1/api", "PARTNER_CENTER_SELL_AUTH_TYPE": "someOtherAuth", } SetTestEnvironment(testEnvironment) - partnerCenterSellService, serviceErr := partnercentersellv1.NewPartnerCenterSellV1UsingExternalConfig(&partnercentersellv1.PartnerCenterSellV1Options{ - }) + partnerCenterSellService, serviceErr := partnercentersellv1.NewPartnerCenterSellV1UsingExternalConfig(&partnercentersellv1.PartnerCenterSellV1Options{}) It(`Instantiate service client with error`, func() { Expect(partnerCenterSellService).To(BeNil()) @@ -140,7 +137,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "PARTNER_CENTER_SELL_AUTH_TYPE": "NOAuth", + "PARTNER_CENTER_SELL_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) @@ -8024,7 +8021,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedAttributesOptionsModel := new(partnercentersellv1.SupportedAttributesOptions) supportedAttributesOptionsModel.Operators = []string{"stringMatch", "stringEquals"} supportedAttributesOptionsModel.Hidden = core.BoolPtr(true) - supportedAttributesOptionsModel.SupportedAttributes = []string{"testString"} + supportedAttributesOptionsModel.SupportedPatterns = []string{"testString"} supportedAttributesOptionsModel.PolicyTypes = []string{"access"} supportedAttributesOptionsModel.IsEmptyValueSupported = core.BoolPtr(true) supportedAttributesOptionsModel.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -8081,7 +8078,6 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Construct an instance of the SupportedRoleOptions model supportedRoleOptionsModel := new(partnercentersellv1.SupportedRoleOptions) supportedRoleOptionsModel.AccessPolicy = core.BoolPtr(true) - supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} supportedRoleOptionsModel.PolicyType = []string{"access"} supportedRoleOptionsModel.AccountType = core.StringPtr("enterprise") @@ -8176,7 +8172,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_attributes": ["SupportedAttributes"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "additional_properties_for_access_policy": {"mapKey": "Inner"}, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) + fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_patterns": ["SupportedPatterns"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) })) }) It(`Invoke CreateIamRegistration successfully with retries`, func() { @@ -8265,7 +8261,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedAttributesOptionsModel := new(partnercentersellv1.SupportedAttributesOptions) supportedAttributesOptionsModel.Operators = []string{"stringMatch", "stringEquals"} supportedAttributesOptionsModel.Hidden = core.BoolPtr(true) - supportedAttributesOptionsModel.SupportedAttributes = []string{"testString"} + supportedAttributesOptionsModel.SupportedPatterns = []string{"testString"} supportedAttributesOptionsModel.PolicyTypes = []string{"access"} supportedAttributesOptionsModel.IsEmptyValueSupported = core.BoolPtr(true) supportedAttributesOptionsModel.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -8322,7 +8318,6 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Construct an instance of the SupportedRoleOptions model supportedRoleOptionsModel := new(partnercentersellv1.SupportedRoleOptions) supportedRoleOptionsModel.AccessPolicy = core.BoolPtr(true) - supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} supportedRoleOptionsModel.PolicyType = []string{"access"} supportedRoleOptionsModel.AccountType = core.StringPtr("enterprise") @@ -8420,7 +8415,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_attributes": ["SupportedAttributes"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "additional_properties_for_access_policy": {"mapKey": "Inner"}, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) + fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_patterns": ["SupportedPatterns"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) })) }) It(`Invoke CreateIamRegistration successfully`, func() { @@ -8514,7 +8509,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedAttributesOptionsModel := new(partnercentersellv1.SupportedAttributesOptions) supportedAttributesOptionsModel.Operators = []string{"stringMatch", "stringEquals"} supportedAttributesOptionsModel.Hidden = core.BoolPtr(true) - supportedAttributesOptionsModel.SupportedAttributes = []string{"testString"} + supportedAttributesOptionsModel.SupportedPatterns = []string{"testString"} supportedAttributesOptionsModel.PolicyTypes = []string{"access"} supportedAttributesOptionsModel.IsEmptyValueSupported = core.BoolPtr(true) supportedAttributesOptionsModel.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -8571,7 +8566,6 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Construct an instance of the SupportedRoleOptions model supportedRoleOptionsModel := new(partnercentersellv1.SupportedRoleOptions) supportedRoleOptionsModel.AccessPolicy = core.BoolPtr(true) - supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} supportedRoleOptionsModel.PolicyType = []string{"access"} supportedRoleOptionsModel.AccountType = core.StringPtr("enterprise") @@ -8707,7 +8701,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedAttributesOptionsModel := new(partnercentersellv1.SupportedAttributesOptions) supportedAttributesOptionsModel.Operators = []string{"stringMatch", "stringEquals"} supportedAttributesOptionsModel.Hidden = core.BoolPtr(true) - supportedAttributesOptionsModel.SupportedAttributes = []string{"testString"} + supportedAttributesOptionsModel.SupportedPatterns = []string{"testString"} supportedAttributesOptionsModel.PolicyTypes = []string{"access"} supportedAttributesOptionsModel.IsEmptyValueSupported = core.BoolPtr(true) supportedAttributesOptionsModel.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -8764,7 +8758,6 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Construct an instance of the SupportedRoleOptions model supportedRoleOptionsModel := new(partnercentersellv1.SupportedRoleOptions) supportedRoleOptionsModel.AccessPolicy = core.BoolPtr(true) - supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} supportedRoleOptionsModel.PolicyType = []string{"access"} supportedRoleOptionsModel.AccountType = core.StringPtr("enterprise") @@ -8921,7 +8914,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedAttributesOptionsModel := new(partnercentersellv1.SupportedAttributesOptions) supportedAttributesOptionsModel.Operators = []string{"stringMatch", "stringEquals"} supportedAttributesOptionsModel.Hidden = core.BoolPtr(true) - supportedAttributesOptionsModel.SupportedAttributes = []string{"testString"} + supportedAttributesOptionsModel.SupportedPatterns = []string{"testString"} supportedAttributesOptionsModel.PolicyTypes = []string{"access"} supportedAttributesOptionsModel.IsEmptyValueSupported = core.BoolPtr(true) supportedAttributesOptionsModel.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -8978,7 +8971,6 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Construct an instance of the SupportedRoleOptions model supportedRoleOptionsModel := new(partnercentersellv1.SupportedRoleOptions) supportedRoleOptionsModel.AccessPolicy = core.BoolPtr(true) - supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} supportedRoleOptionsModel.PolicyType = []string{"access"} supportedRoleOptionsModel.AccountType = core.StringPtr("enterprise") @@ -9136,7 +9128,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedAttributesOptionsModel := new(partnercentersellv1.SupportedAttributesOptions) supportedAttributesOptionsModel.Operators = []string{"stringMatch", "stringEquals"} supportedAttributesOptionsModel.Hidden = core.BoolPtr(true) - supportedAttributesOptionsModel.SupportedAttributes = []string{"testString"} + supportedAttributesOptionsModel.SupportedPatterns = []string{"testString"} supportedAttributesOptionsModel.PolicyTypes = []string{"access"} supportedAttributesOptionsModel.IsEmptyValueSupported = core.BoolPtr(true) supportedAttributesOptionsModel.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -9193,7 +9185,6 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Construct an instance of the SupportedRoleOptions model supportedRoleOptionsModel := new(partnercentersellv1.SupportedRoleOptions) supportedRoleOptionsModel.AccessPolicy = core.BoolPtr(true) - supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} supportedRoleOptionsModel.PolicyType = []string{"access"} supportedRoleOptionsModel.AccountType = core.StringPtr("enterprise") @@ -9294,7 +9285,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_attributes": ["SupportedAttributes"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "additional_properties_for_access_policy": {"mapKey": "Inner"}, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) + fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_patterns": ["SupportedPatterns"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) })) }) It(`Invoke UpdateIamRegistration successfully with retries`, func() { @@ -9383,7 +9374,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedAttributesOptionsModel := new(partnercentersellv1.SupportedAttributesOptions) supportedAttributesOptionsModel.Operators = []string{"stringMatch", "stringEquals"} supportedAttributesOptionsModel.Hidden = core.BoolPtr(true) - supportedAttributesOptionsModel.SupportedAttributes = []string{"testString"} + supportedAttributesOptionsModel.SupportedPatterns = []string{"testString"} supportedAttributesOptionsModel.PolicyTypes = []string{"access"} supportedAttributesOptionsModel.IsEmptyValueSupported = core.BoolPtr(true) supportedAttributesOptionsModel.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -9440,7 +9431,6 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Construct an instance of the SupportedRoleOptions model supportedRoleOptionsModel := new(partnercentersellv1.SupportedRoleOptions) supportedRoleOptionsModel.AccessPolicy = core.BoolPtr(true) - supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} supportedRoleOptionsModel.PolicyType = []string{"access"} supportedRoleOptionsModel.AccountType = core.StringPtr("enterprise") @@ -9544,7 +9534,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_attributes": ["SupportedAttributes"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "additional_properties_for_access_policy": {"mapKey": "Inner"}, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) + fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_patterns": ["SupportedPatterns"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) })) }) It(`Invoke UpdateIamRegistration successfully`, func() { @@ -9638,7 +9628,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedAttributesOptionsModel := new(partnercentersellv1.SupportedAttributesOptions) supportedAttributesOptionsModel.Operators = []string{"stringMatch", "stringEquals"} supportedAttributesOptionsModel.Hidden = core.BoolPtr(true) - supportedAttributesOptionsModel.SupportedAttributes = []string{"testString"} + supportedAttributesOptionsModel.SupportedPatterns = []string{"testString"} supportedAttributesOptionsModel.PolicyTypes = []string{"access"} supportedAttributesOptionsModel.IsEmptyValueSupported = core.BoolPtr(true) supportedAttributesOptionsModel.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -9695,7 +9685,6 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Construct an instance of the SupportedRoleOptions model supportedRoleOptionsModel := new(partnercentersellv1.SupportedRoleOptions) supportedRoleOptionsModel.AccessPolicy = core.BoolPtr(true) - supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} supportedRoleOptionsModel.PolicyType = []string{"access"} supportedRoleOptionsModel.AccountType = core.StringPtr("enterprise") @@ -9837,7 +9826,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedAttributesOptionsModel := new(partnercentersellv1.SupportedAttributesOptions) supportedAttributesOptionsModel.Operators = []string{"stringMatch", "stringEquals"} supportedAttributesOptionsModel.Hidden = core.BoolPtr(true) - supportedAttributesOptionsModel.SupportedAttributes = []string{"testString"} + supportedAttributesOptionsModel.SupportedPatterns = []string{"testString"} supportedAttributesOptionsModel.PolicyTypes = []string{"access"} supportedAttributesOptionsModel.IsEmptyValueSupported = core.BoolPtr(true) supportedAttributesOptionsModel.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -9894,7 +9883,6 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Construct an instance of the SupportedRoleOptions model supportedRoleOptionsModel := new(partnercentersellv1.SupportedRoleOptions) supportedRoleOptionsModel.AccessPolicy = core.BoolPtr(true) - supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} supportedRoleOptionsModel.PolicyType = []string{"access"} supportedRoleOptionsModel.AccountType = core.StringPtr("enterprise") @@ -10057,7 +10045,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedAttributesOptionsModel := new(partnercentersellv1.SupportedAttributesOptions) supportedAttributesOptionsModel.Operators = []string{"stringMatch", "stringEquals"} supportedAttributesOptionsModel.Hidden = core.BoolPtr(true) - supportedAttributesOptionsModel.SupportedAttributes = []string{"testString"} + supportedAttributesOptionsModel.SupportedPatterns = []string{"testString"} supportedAttributesOptionsModel.PolicyTypes = []string{"access"} supportedAttributesOptionsModel.IsEmptyValueSupported = core.BoolPtr(true) supportedAttributesOptionsModel.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -10114,7 +10102,6 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Construct an instance of the SupportedRoleOptions model supportedRoleOptionsModel := new(partnercentersellv1.SupportedRoleOptions) supportedRoleOptionsModel.AccessPolicy = core.BoolPtr(true) - supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} supportedRoleOptionsModel.PolicyType = []string{"access"} supportedRoleOptionsModel.AccountType = core.StringPtr("enterprise") @@ -10316,7 +10303,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_attributes": ["SupportedAttributes"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "additional_properties_for_access_policy": {"mapKey": "Inner"}, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) + fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_patterns": ["SupportedPatterns"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) })) }) It(`Invoke GetIamRegistration successfully with retries`, func() { @@ -10373,7 +10360,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_attributes": ["SupportedAttributes"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "additional_properties_for_access_policy": {"mapKey": "Inner"}, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) + fmt.Fprintf(res, "%s", `{"name": "Name", "enabled": false, "service_type": "service", "actions": [{"id": "ID", "roles": ["Roles"], "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"hidden": true}}], "additional_policy_scopes": ["AdditionalPolicyScopes"], "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "parent_ids": ["ParentIds"], "resource_hierarchy_attribute": {"key": "Key", "value": "Value"}, "supported_anonymous_accesses": [{"attributes": {"account_id": "AccountID", "service_name": "ServiceName", "additional_properties": {"mapKey": "Inner"}}, "roles": ["Roles"]}], "supported_attributes": [{"key": "Key", "options": {"operators": ["stringEquals"], "hidden": true, "supported_patterns": ["SupportedPatterns"], "policy_types": ["access"], "is_empty_value_supported": false, "is_string_exists_false_value_supported": false, "key": "Key", "resource_hierarchy": {"key": {"key": "Key", "value": "Value"}, "value": {"key": "Key"}}}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "ui": {"input_type": "InputType", "input_details": {"type": "Type", "values": [{"value": "Value", "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}}], "gst": {"query": "Query", "value_property_name": "ValuePropertyName", "label_property_name": "LabelPropertyName", "input_option_label": "InputOptionLabel"}, "url": {"url_endpoint": "UrlEndpoint", "input_option_label": "InputOptionLabel"}}}}], "supported_authorization_subjects": [{"attributes": {"service_name": "ServiceName", "resource_type": "ResourceType"}, "roles": ["Roles"]}], "supported_roles": [{"id": "ID", "description": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "display_name": {"default": "Default", "en": "En", "de": "De", "es": "Es", "fr": "Fr", "it": "It", "ja": "Ja", "ko": "Ko", "pt_br": "PtBr", "zh_tw": "ZhTw", "zh_cn": "ZhCn"}, "options": {"access_policy": true, "policy_type": ["access"], "account_type": "enterprise"}}], "supported_network": {"environment_attributes": [{"key": "Key", "values": ["Values"], "options": {"hidden": true}}]}}`) })) }) It(`Invoke GetIamRegistration successfully`, func() { @@ -12628,7 +12615,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { Expect(supportedAttributesOptionsModel).ToNot(BeNil()) supportedAttributesOptionsModel.Operators = []string{"stringMatch", "stringEquals"} supportedAttributesOptionsModel.Hidden = core.BoolPtr(true) - supportedAttributesOptionsModel.SupportedAttributes = []string{"testString"} + supportedAttributesOptionsModel.SupportedPatterns = []string{"testString"} supportedAttributesOptionsModel.PolicyTypes = []string{"access"} supportedAttributesOptionsModel.IsEmptyValueSupported = core.BoolPtr(true) supportedAttributesOptionsModel.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -12636,7 +12623,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedAttributesOptionsModel.ResourceHierarchy = supportedAttributesOptionsResourceHierarchyModel Expect(supportedAttributesOptionsModel.Operators).To(Equal([]string{"stringMatch", "stringEquals"})) Expect(supportedAttributesOptionsModel.Hidden).To(Equal(core.BoolPtr(true))) - Expect(supportedAttributesOptionsModel.SupportedAttributes).To(Equal([]string{"testString"})) + Expect(supportedAttributesOptionsModel.SupportedPatterns).To(Equal([]string{"testString"})) Expect(supportedAttributesOptionsModel.PolicyTypes).To(Equal([]string{"access"})) Expect(supportedAttributesOptionsModel.IsEmptyValueSupported).To(Equal(core.BoolPtr(true))) Expect(supportedAttributesOptionsModel.IsStringExistsFalseValueSupported).To(Equal(core.BoolPtr(true))) @@ -12725,11 +12712,9 @@ var _ = Describe(`PartnerCenterSellV1`, func() { supportedRoleOptionsModel := new(partnercentersellv1.SupportedRoleOptions) Expect(supportedRoleOptionsModel).ToNot(BeNil()) supportedRoleOptionsModel.AccessPolicy = core.BoolPtr(true) - supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} supportedRoleOptionsModel.PolicyType = []string{"access"} supportedRoleOptionsModel.AccountType = core.StringPtr("enterprise") Expect(supportedRoleOptionsModel.AccessPolicy).To(Equal(core.BoolPtr(true))) - Expect(supportedRoleOptionsModel.AdditionalPropertiesForAccessPolicy).To(Equal(map[string]string{"key1": "testString"})) Expect(supportedRoleOptionsModel.PolicyType).To(Equal([]string{"access"})) Expect(supportedRoleOptionsModel.AccountType).To(Equal(core.StringPtr("enterprise"))) @@ -14475,7 +14460,7 @@ var _ = Describe(`PartnerCenterSellV1`, func() { model := new(partnercentersellv1.SupportedAttributesOptions) model.Operators = []string{"stringEquals"} model.Hidden = core.BoolPtr(true) - model.SupportedAttributes = []string{"testString"} + model.SupportedPatterns = []string{"testString"} model.PolicyTypes = []string{"access"} model.IsEmptyValueSupported = core.BoolPtr(true) model.IsStringExistsFalseValueSupported = core.BoolPtr(true) @@ -14555,7 +14540,6 @@ var _ = Describe(`PartnerCenterSellV1`, func() { // Construct an instance of the model. model := new(partnercentersellv1.SupportedRoleOptions) model.AccessPolicy = core.BoolPtr(true) - model.AdditionalPropertiesForAccessPolicy = map[string]string{"key1": "testString"} model.PolicyType = []string{"access"} model.AccountType = core.StringPtr("enterprise") From b7013359b4310c9b23b5d36194e3123593a9b6bb Mon Sep 17 00:00:00 2001 From: Peter Harasztia Date: Mon, 18 Nov 2024 15:22:57 +0100 Subject: [PATCH 2/3] fix(partner center sell): fix default url Signed-off-by: Peter Harasztia --- partnercentersellv1/partner_center_sell_v1.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partnercentersellv1/partner_center_sell_v1.go b/partnercentersellv1/partner_center_sell_v1.go index 7266f8dd..afc45947 100644 --- a/partnercentersellv1/partner_center_sell_v1.go +++ b/partnercentersellv1/partner_center_sell_v1.go @@ -42,7 +42,7 @@ type PartnerCenterSellV1 struct { } // DefaultServiceURL is the default URL to make service requests to. -const DefaultServiceURL = "http://localhost:5005/openapi/v1" +const DefaultServiceURL = "https://product-lifecycle.cloud.ibm.com/openapi/v1" // DefaultServiceName is the default key used to find external configuration information. const DefaultServiceName = "partner_center_sell" From 353e92aa2fbc134301f45a32098debf135471b7d Mon Sep 17 00:00:00 2001 From: Peter Harasztia Date: Wed, 20 Nov 2024 15:59:49 +0100 Subject: [PATCH 3/3] fix(partner center sell): test fix Signed-off-by: Peter Harasztia --- .../partner_center_sell_v1_integration_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/partnercentersellv1/partner_center_sell_v1_integration_test.go b/partnercentersellv1/partner_center_sell_v1_integration_test.go index 1a0ca237..790019c1 100644 --- a/partnercentersellv1/partner_center_sell_v1_integration_test.go +++ b/partnercentersellv1/partner_center_sell_v1_integration_test.go @@ -398,10 +398,11 @@ var _ = Describe(`PartnerCenterSellV1 Integration Tests`, func() { var randomInteger = strconv.Itoa(rand.Intn(1000)) objectId := fmt.Sprintf("random-id-%s", randomInteger) + randomName := fmt.Sprintf("random-name-%s", randomInteger) createCatalogProductOptions := &partnercentersellv1.CreateCatalogProductOptions{ ProductID: core.StringPtr(productIdWithApprovedProgrammaticName), - Name: core.StringPtr(iamServiceRegistrationId), + Name: core.StringPtr(randomName), Active: core.BoolPtr(true), Disabled: core.BoolPtr(false), Kind: core.StringPtr("service"), @@ -934,7 +935,7 @@ var _ = Describe(`PartnerCenterSellV1 Integration Tests`, func() { ObjectID: core.StringPtr(objectId), OverviewUi: globalCatalogOverviewUiModel, Metadata: globalCatalogDeploymentMetadataModel, - Env: core.StringPtr("testString"), + Env: core.StringPtr(env), } globalCatalogDeployment, response, err := partnerCenterSellService.CreateCatalogDeployment(createCatalogDeploymentOptions) @@ -1464,7 +1465,7 @@ var _ = Describe(`PartnerCenterSellV1 Integration Tests`, func() { RegistrationID: ®istrationIdLink, } - registration, response, err := partnerCenterSellService.GetRegistration(getRegistrationOptions) + registration, response, err := partnerCenterSellServiceAlt.GetRegistration(getRegistrationOptions) Expect(err).To(BeNil()) Expect(response.StatusCode).To(Equal(200)) Expect(registration).ToNot(BeNil()) @@ -1681,7 +1682,7 @@ var _ = Describe(`PartnerCenterSellV1 Integration Tests`, func() { }) It(`GetProductBadge(getProductBadgeOptions *GetProductBadgeOptions)`, func() { getProductBadgeOptions := &partnercentersellv1.GetProductBadgeOptions{ - BadgeID: CreateMockUUID("9fab83da-98cb-4f18-a7ba-b6f0435c9673"), + BadgeID: CreateMockUUID(badgeId), } productBadge, response, err := partnerCenterSellService.GetProductBadge(getProductBadgeOptions)