diff --git a/docs/resources/service.md b/docs/resources/service.md index 2596428..736d011 100644 --- a/docs/resources/service.md +++ b/docs/resources/service.md @@ -59,7 +59,6 @@ resource "clickhouse_service" "service" { - `encryption_assumed_role_identifier` (String) Custom role identifier ARN. - `encryption_key` (String) Custom encryption key ARN. - `endpoints` (Attributes) Allow to enable and configure additional endpoints (read protocols) to expose on the ClickHouse service. (see [below for nested schema](#nestedatt--endpoints)) -- `has_transparent_data_encryption` (Boolean) If true, the Transparent Data Encryption (TDE) feature is enabled in the service. Only supported in AWS and GCP. Requires an organization with the Enterprise plan. - `idle_scaling` (Boolean) When set to true the service is allowed to scale down to zero when idle. - `idle_timeout_minutes` (Number) Set minimum idling timeout (in minutes). Must be greater than or equal to 5 minutes. Must be set if idle_scaling is enabled. - `max_replica_memory_gb` (Number) Maximum memory of a single replica during auto-scaling in Gb. Must be a multiple of 8. `max_replica_memory_gb` x `num_replicas` (default 3) must be lower than 360 for non paid services or 720 for paid services. @@ -73,6 +72,7 @@ resource "clickhouse_service" "service" { - `readonly` (Boolean) Indicates if this service should be read only. Only allowed for secondary services, those which share data with another service (i.e. when `warehouse_id` field is set). - `release_channel` (String) Release channel to use for this service. Either 'default' or 'fast'. Switching from 'fast' to 'default' release channel is not supported. - `tier` (String) Tier of the service: 'development', 'production'. Required for organizations using the Legacy ClickHouse Cloud Tiers, must be omitted for organizations using the new ClickHouse Cloud Tiers. +- `transparent_data_encryption` (Attributes) Configuration of the Transparent Data Encryption (TDE) feature. Requires an organization with the Enterprise plan. (see [below for nested schema](#nestedatt--transparent_data_encryption)) - `warehouse_id` (String) ID of the warehouse to share the data with. Must be in the same cloud and region. ### Read-Only @@ -155,6 +155,18 @@ Optional: - `allowed_origins` (String) Comma separated list of domain names to be allowed cross-origin resource sharing (CORS) access to the query API. Leave this field empty to restrict access to backend servers only + +### Nested Schema for `transparent_data_encryption` + +Required: + +- `enabled` (Boolean) If true, TDE is enabled for the service. + +Read-Only: + +- `role_id` (String) ID of Role to be used for granting access to the Encryption Key. This is an ARN for AWS services and a Service Account Identifier for GCP. + + ### Nested Schema for `private_endpoint_config` diff --git a/docs/resources/service_transparent_data_encryption_key_association.md b/docs/resources/service_transparent_data_encryption_key_association.md new file mode 100644 index 0000000..75441cc --- /dev/null +++ b/docs/resources/service_transparent_data_encryption_key_association.md @@ -0,0 +1,47 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "clickhouse_service_transparent_data_encryption_key_association Resource - clickhouse" +subcategory: "" +description: |- + You can use the clickhouse_service_transparent_data_encryption_key_association resource to associate your own Encryption Key with a Clickhouse Service with the Transparent Data Encryption (TDE) feature enabled. + Please note that this feature requires an organization with the Enterprise plan. +--- + +# clickhouse_service_transparent_data_encryption_key_association (Resource) + +You can use the *clickhouse_service_transparent_data_encryption_key_association* resource to associate your own Encryption Key with a Clickhouse Service with the Transparent Data Encryption (TDE) feature enabled. +Please note that this feature requires an organization with the `Enterprise` plan. + +## Example Usage + +```terraform +resource "clickhouse_service" "service" { + ... +} + +resource "aws_kms_key" "enc" { + ... +} + +resource "clickhouse_service_transparent_data_encryption_key_association" "service_key_association" { + service_id = clickhouse_service.service.id + key_id = aws_kms_key.enc.arn +} +``` + + +## Schema + +### Required + +- `key_id` (String) ID of the Encryption key to use for data encryption. Must be an ARN for AWS services or a Key Resource Path for GCP services. +- `service_id` (String) ClickHouse Service ID + +## Import + +Import is supported using the following syntax: + +```shell +# Endpoint Attachments can be imported by specifying the clickhouse service UUID +terraform import clickhouse_service_transparent_data_encryption_key_association.example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +``` diff --git a/examples/full/tde/aws/aws.tf b/examples/full/tde/aws/aws.tf new file mode 100644 index 0000000..b6eb693 --- /dev/null +++ b/examples/full/tde/aws/aws.tf @@ -0,0 +1,107 @@ +variable "aws_key" { + type = string +} + +variable "aws_secret" { + type = string +} + +variable "aws_session_token" { + type = string + default = "" +} + +locals { + tags = { + Name = var.service_name + } +} + +provider "aws" { + region = var.region + access_key = var.aws_key + secret_key = var.aws_secret + token = var.aws_session_token +} + +data "aws_caller_identity" "current" {} + +data "aws_iam_policy_document" "policy" { + # Allow root user on the account all access. + statement { + sid = "AllowRoot" + + actions = ["kms:*"] + resources = ["*"] + principals { + type = "AWS" + identifiers = ["arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"] + } + } + + # Allow user that runs terraform to manage the KMS key. + statement { + sid = "AllowAdmins" + actions = [ + "kms:Create*", + "kms:Describe*", + "kms:Enable*", + "kms:List*", + "kms:Put*", + "kms:Update*", + "kms:Revoke*", + "kms:Disable*", + "kms:Get*", + "kms:Delete*", + "kms:TagResource", + "kms:UntagResource", + "kms:ScheduleKeyDeletion", + "kms:CancelKeyDeletion", + "kms:RotateKeyOnDemand", + "kms:Encrypt", + "kms:Decrypt", + "kms:ReEncrypt*", + "kms:DescribeKey", + "kms:CreateGrant", + "kms:ListGrants", + "kms:RevokeGrant" + ] + resources = ["*"] + + principals { + type = "AWS" + identifiers = [data.aws_caller_identity.current.arn] + } + } + + # Allow clickhouse's accounts to access the KMS key. + statement { + sid = "AllowClickHouse" + actions = [ + "kms:Encrypt", + "kms:Decrypt", + "kms:ReEncrypt*", + "kms:DescribeKey", + ] + resources = ["*"] + + principals { + type = "AWS" + identifiers = [clickhouse_service.service.transparent_data_encryption.role_id] + } + } +} + +resource "aws_kms_key" "enc" { + customer_master_key_spec = "SYMMETRIC_DEFAULT" + deletion_window_in_days = 7 + description = var.service_name + enable_key_rotation = false + is_enabled = true + key_usage = "ENCRYPT_DECRYPT" + multi_region = false + + policy = data.aws_iam_policy_document.policy.json + + tags = local.tags +} diff --git a/examples/full/tde/aws/main.tf b/examples/full/tde/aws/main.tf index 866879f..887382e 100644 --- a/examples/full/tde/aws/main.tf +++ b/examples/full/tde/aws/main.tf @@ -48,22 +48,6 @@ resource "clickhouse_service" "service" { } ] - endpoints = { - mysql = { - enabled = true - } - } - - query_api_endpoints = { - api_key_ids = [ - data.clickhouse_api_key_id.self.id, - ] - roles = [ - "sql_console_admin" - ] - allowed_origins = null - } - min_replica_memory_gb = 8 max_replica_memory_gb = 120 @@ -73,7 +57,14 @@ resource "clickhouse_service" "service" { backup_start_time = null } - has_transparent_data_encryption = true + transparent_data_encryption = { + enabled = true + } +} + +resource "clickhouse_service_transparent_data_encryption_key_association" "service_key_association" { + service_id = clickhouse_service.service.id + key_id = aws_kms_key.enc.arn } output "service_endpoints" { diff --git a/examples/full/tde/aws/variables.tfvars.sample b/examples/full/tde/aws/variables.tfvars.sample index 61d2cb4..286ef28 100644 --- a/examples/full/tde/aws/variables.tfvars.sample +++ b/examples/full/tde/aws/variables.tfvars.sample @@ -2,3 +2,8 @@ organization_id = "aee076c1-3f83-4637-95b1-ad5a0a825b71" token_key = "avhj1U5QCdWAE9CA9" token_secret = "4b1dROiHQEuSXJHlV8zHFd0S7WQj7CGxz5kGJeJnca" + +# AWS +aws_key = "key" +aws_secret = "secret" +aws_region = "us-west-2" diff --git a/examples/full/tde/gcp/main.tf b/examples/full/tde/gcp/main.tf index 33e7a76..fce3b7b 100644 --- a/examples/full/tde/gcp/main.tf +++ b/examples/full/tde/gcp/main.tf @@ -71,7 +71,9 @@ resource "clickhouse_service" "service" { backup_retention_period_in_hours = 48 } - has_transparent_data_encryption = true + transparent_data_encryption = { + enabled = true + } } output "service_endpoints" { diff --git a/examples/resources/clickhouse_service_transparent_data_encryption_key_association/import.sh b/examples/resources/clickhouse_service_transparent_data_encryption_key_association/import.sh new file mode 100644 index 0000000..c674d9b --- /dev/null +++ b/examples/resources/clickhouse_service_transparent_data_encryption_key_association/import.sh @@ -0,0 +1,2 @@ +# Endpoint Attachments can be imported by specifying the clickhouse service UUID +terraform import clickhouse_service_transparent_data_encryption_key_association.example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx diff --git a/examples/resources/clickhouse_service_transparent_data_encryption_key_association/resource.tf b/examples/resources/clickhouse_service_transparent_data_encryption_key_association/resource.tf new file mode 100644 index 0000000..969788d --- /dev/null +++ b/examples/resources/clickhouse_service_transparent_data_encryption_key_association/resource.tf @@ -0,0 +1,12 @@ +resource "clickhouse_service" "service" { + ... +} + +resource "aws_kms_key" "enc" { + ... +} + +resource "clickhouse_service_transparent_data_encryption_key_association" "service_key_association" { + service_id = clickhouse_service.service.id + key_id = aws_kms_key.enc.arn +} diff --git a/pkg/internal/api/client_mock.go b/pkg/internal/api/client_mock.go index 2505e53..ada19ed 100644 --- a/pkg/internal/api/client_mock.go +++ b/pkg/internal/api/client_mock.go @@ -1,4 +1,4 @@ -// Code generated by http://github.com/gojuno/minimock (v3.4.3). DO NOT EDIT. +// Code generated by http://github.com/gojuno/minimock (v3.3.13). DO NOT EDIT. package api @@ -19,315 +19,276 @@ type ClientMock struct { finishOnce sync.Once funcChangeClickPipeState func(ctx context.Context, serviceId string, clickPipeId string, command string) (cp1 *ClickPipe, err error) - funcChangeClickPipeStateOrigin string inspectFuncChangeClickPipeState func(ctx context.Context, serviceId string, clickPipeId string, command string) afterChangeClickPipeStateCounter uint64 beforeChangeClickPipeStateCounter uint64 ChangeClickPipeStateMock mClientMockChangeClickPipeState funcCreateClickPipe func(ctx context.Context, serviceId string, clickPipe ClickPipe) (cp1 *ClickPipe, err error) - funcCreateClickPipeOrigin string inspectFuncCreateClickPipe func(ctx context.Context, serviceId string, clickPipe ClickPipe) afterCreateClickPipeCounter uint64 beforeCreateClickPipeCounter uint64 CreateClickPipeMock mClientMockCreateClickPipe funcCreateDatabase func(ctx context.Context, serviceID string, db Database) (err error) - funcCreateDatabaseOrigin string inspectFuncCreateDatabase func(ctx context.Context, serviceID string, db Database) afterCreateDatabaseCounter uint64 beforeCreateDatabaseCounter uint64 CreateDatabaseMock mClientMockCreateDatabase funcCreateQueryEndpoint func(ctx context.Context, serviceID string, endpoint ServiceQueryEndpoint) (sp1 *ServiceQueryEndpoint, err error) - funcCreateQueryEndpointOrigin string inspectFuncCreateQueryEndpoint func(ctx context.Context, serviceID string, endpoint ServiceQueryEndpoint) afterCreateQueryEndpointCounter uint64 beforeCreateQueryEndpointCounter uint64 CreateQueryEndpointMock mClientMockCreateQueryEndpoint funcCreateReversePrivateEndpoint func(ctx context.Context, serviceId string, request CreateReversePrivateEndpoint) (rp1 *ReversePrivateEndpoint, err error) - funcCreateReversePrivateEndpointOrigin string inspectFuncCreateReversePrivateEndpoint func(ctx context.Context, serviceId string, request CreateReversePrivateEndpoint) afterCreateReversePrivateEndpointCounter uint64 beforeCreateReversePrivateEndpointCounter uint64 CreateReversePrivateEndpointMock mClientMockCreateReversePrivateEndpoint funcCreateRole func(ctx context.Context, serviceId string, role Role) (rp1 *Role, err error) - funcCreateRoleOrigin string inspectFuncCreateRole func(ctx context.Context, serviceId string, role Role) afterCreateRoleCounter uint64 beforeCreateRoleCounter uint64 CreateRoleMock mClientMockCreateRole funcCreateService func(ctx context.Context, s Service) (sp1 *Service, s1 string, err error) - funcCreateServiceOrigin string inspectFuncCreateService func(ctx context.Context, s Service) afterCreateServiceCounter uint64 beforeCreateServiceCounter uint64 CreateServiceMock mClientMockCreateService funcCreateUser func(ctx context.Context, serviceId string, user User) (up1 *User, err error) - funcCreateUserOrigin string inspectFuncCreateUser func(ctx context.Context, serviceId string, user User) afterCreateUserCounter uint64 beforeCreateUserCounter uint64 CreateUserMock mClientMockCreateUser funcDeleteClickPipe func(ctx context.Context, serviceId string, clickPipeId string) (err error) - funcDeleteClickPipeOrigin string inspectFuncDeleteClickPipe func(ctx context.Context, serviceId string, clickPipeId string) afterDeleteClickPipeCounter uint64 beforeDeleteClickPipeCounter uint64 DeleteClickPipeMock mClientMockDeleteClickPipe funcDeleteDatabase func(ctx context.Context, serviceID string, name string) (err error) - funcDeleteDatabaseOrigin string inspectFuncDeleteDatabase func(ctx context.Context, serviceID string, name string) afterDeleteDatabaseCounter uint64 beforeDeleteDatabaseCounter uint64 DeleteDatabaseMock mClientMockDeleteDatabase funcDeleteQueryEndpoint func(ctx context.Context, serviceID string) (err error) - funcDeleteQueryEndpointOrigin string inspectFuncDeleteQueryEndpoint func(ctx context.Context, serviceID string) afterDeleteQueryEndpointCounter uint64 beforeDeleteQueryEndpointCounter uint64 DeleteQueryEndpointMock mClientMockDeleteQueryEndpoint funcDeleteReversePrivateEndpoint func(ctx context.Context, serviceId string, reversePrivateEndpointId string) (err error) - funcDeleteReversePrivateEndpointOrigin string inspectFuncDeleteReversePrivateEndpoint func(ctx context.Context, serviceId string, reversePrivateEndpointId string) afterDeleteReversePrivateEndpointCounter uint64 beforeDeleteReversePrivateEndpointCounter uint64 DeleteReversePrivateEndpointMock mClientMockDeleteReversePrivateEndpoint funcDeleteRole func(ctx context.Context, serviceID string, name string) (err error) - funcDeleteRoleOrigin string inspectFuncDeleteRole func(ctx context.Context, serviceID string, name string) afterDeleteRoleCounter uint64 beforeDeleteRoleCounter uint64 DeleteRoleMock mClientMockDeleteRole funcDeleteService func(ctx context.Context, serviceId string) (sp1 *Service, err error) - funcDeleteServiceOrigin string inspectFuncDeleteService func(ctx context.Context, serviceId string) afterDeleteServiceCounter uint64 beforeDeleteServiceCounter uint64 DeleteServiceMock mClientMockDeleteService funcDeleteUser func(ctx context.Context, serviceID string, name string) (err error) - funcDeleteUserOrigin string inspectFuncDeleteUser func(ctx context.Context, serviceID string, name string) afterDeleteUserCounter uint64 beforeDeleteUserCounter uint64 DeleteUserMock mClientMockDeleteUser funcGetApiKeyID func(ctx context.Context, name *string) (ap1 *ApiKey, err error) - funcGetApiKeyIDOrigin string inspectFuncGetApiKeyID func(ctx context.Context, name *string) afterGetApiKeyIDCounter uint64 beforeGetApiKeyIDCounter uint64 GetApiKeyIDMock mClientMockGetApiKeyID funcGetBackupConfiguration func(ctx context.Context, serviceId string) (bp1 *BackupConfiguration, err error) - funcGetBackupConfigurationOrigin string inspectFuncGetBackupConfiguration func(ctx context.Context, serviceId string) afterGetBackupConfigurationCounter uint64 beforeGetBackupConfigurationCounter uint64 GetBackupConfigurationMock mClientMockGetBackupConfiguration funcGetClickPipe func(ctx context.Context, serviceId string, clickPipeId string) (cp1 *ClickPipe, err error) - funcGetClickPipeOrigin string inspectFuncGetClickPipe func(ctx context.Context, serviceId string, clickPipeId string) afterGetClickPipeCounter uint64 beforeGetClickPipeCounter uint64 GetClickPipeMock mClientMockGetClickPipe funcGetDatabase func(ctx context.Context, serviceID string, name string) (dp1 *Database, err error) - funcGetDatabaseOrigin string inspectFuncGetDatabase func(ctx context.Context, serviceID string, name string) afterGetDatabaseCounter uint64 beforeGetDatabaseCounter uint64 GetDatabaseMock mClientMockGetDatabase funcGetGrantPrivilege func(ctx context.Context, serviceID string, accessType string, database *string, table *string, column *string, granteeUserName *string, granteeRoleName *string) (gp1 *GrantPrivilege, err error) - funcGetGrantPrivilegeOrigin string inspectFuncGetGrantPrivilege func(ctx context.Context, serviceID string, accessType string, database *string, table *string, column *string, granteeUserName *string, granteeRoleName *string) afterGetGrantPrivilegeCounter uint64 beforeGetGrantPrivilegeCounter uint64 GetGrantPrivilegeMock mClientMockGetGrantPrivilege funcGetGrantRole func(ctx context.Context, serviceID string, grantedRoleName string, granteeUserName *string, granteeRoleName *string) (gp1 *GrantRole, err error) - funcGetGrantRoleOrigin string inspectFuncGetGrantRole func(ctx context.Context, serviceID string, grantedRoleName string, granteeUserName *string, granteeRoleName *string) afterGetGrantRoleCounter uint64 beforeGetGrantRoleCounter uint64 GetGrantRoleMock mClientMockGetGrantRole funcGetOrgPrivateEndpointConfig func(ctx context.Context, cloudProvider string, region string) (op1 *OrgPrivateEndpointConfig, err error) - funcGetOrgPrivateEndpointConfigOrigin string inspectFuncGetOrgPrivateEndpointConfig func(ctx context.Context, cloudProvider string, region string) afterGetOrgPrivateEndpointConfigCounter uint64 beforeGetOrgPrivateEndpointConfigCounter uint64 GetOrgPrivateEndpointConfigMock mClientMockGetOrgPrivateEndpointConfig funcGetOrganizationPrivateEndpoints func(ctx context.Context) (pap1 *[]PrivateEndpoint, err error) - funcGetOrganizationPrivateEndpointsOrigin string inspectFuncGetOrganizationPrivateEndpoints func(ctx context.Context) afterGetOrganizationPrivateEndpointsCounter uint64 beforeGetOrganizationPrivateEndpointsCounter uint64 GetOrganizationPrivateEndpointsMock mClientMockGetOrganizationPrivateEndpoints funcGetQueryEndpoint func(ctx context.Context, serviceID string) (sp1 *ServiceQueryEndpoint, err error) - funcGetQueryEndpointOrigin string inspectFuncGetQueryEndpoint func(ctx context.Context, serviceID string) afterGetQueryEndpointCounter uint64 beforeGetQueryEndpointCounter uint64 GetQueryEndpointMock mClientMockGetQueryEndpoint funcGetReversePrivateEndpoint func(ctx context.Context, serviceId string, reversePrivateEndpointId string) (rp1 *ReversePrivateEndpoint, err error) - funcGetReversePrivateEndpointOrigin string inspectFuncGetReversePrivateEndpoint func(ctx context.Context, serviceId string, reversePrivateEndpointId string) afterGetReversePrivateEndpointCounter uint64 beforeGetReversePrivateEndpointCounter uint64 GetReversePrivateEndpointMock mClientMockGetReversePrivateEndpoint funcGetReversePrivateEndpointPath func(serviceId string, reversePrivateEndpointId string) (s1 string) - funcGetReversePrivateEndpointPathOrigin string inspectFuncGetReversePrivateEndpointPath func(serviceId string, reversePrivateEndpointId string) afterGetReversePrivateEndpointPathCounter uint64 beforeGetReversePrivateEndpointPathCounter uint64 GetReversePrivateEndpointPathMock mClientMockGetReversePrivateEndpointPath funcGetRole func(ctx context.Context, serviceID string, name string) (rp1 *Role, err error) - funcGetRoleOrigin string inspectFuncGetRole func(ctx context.Context, serviceID string, name string) afterGetRoleCounter uint64 beforeGetRoleCounter uint64 GetRoleMock mClientMockGetRole funcGetService func(ctx context.Context, serviceId string) (sp1 *Service, err error) - funcGetServiceOrigin string inspectFuncGetService func(ctx context.Context, serviceId string) afterGetServiceCounter uint64 beforeGetServiceCounter uint64 GetServiceMock mClientMockGetService funcGetUser func(ctx context.Context, serviceID string, name string) (up1 *User, err error) - funcGetUserOrigin string inspectFuncGetUser func(ctx context.Context, serviceID string, name string) afterGetUserCounter uint64 beforeGetUserCounter uint64 GetUserMock mClientMockGetUser funcGrantPrivilege func(ctx context.Context, serviceId string, grantPrivilege GrantPrivilege) (gp1 *GrantPrivilege, err error) - funcGrantPrivilegeOrigin string inspectFuncGrantPrivilege func(ctx context.Context, serviceId string, grantPrivilege GrantPrivilege) afterGrantPrivilegeCounter uint64 beforeGrantPrivilegeCounter uint64 GrantPrivilegeMock mClientMockGrantPrivilege funcGrantRole func(ctx context.Context, serviceId string, grantRole GrantRole) (gp1 *GrantRole, err error) - funcGrantRoleOrigin string inspectFuncGrantRole func(ctx context.Context, serviceId string, grantRole GrantRole) afterGrantRoleCounter uint64 beforeGrantRoleCounter uint64 GrantRoleMock mClientMockGrantRole funcListReversePrivateEndpoints func(ctx context.Context, serviceId string) (rpa1 []*ReversePrivateEndpoint, err error) - funcListReversePrivateEndpointsOrigin string inspectFuncListReversePrivateEndpoints func(ctx context.Context, serviceId string) afterListReversePrivateEndpointsCounter uint64 beforeListReversePrivateEndpointsCounter uint64 ListReversePrivateEndpointsMock mClientMockListReversePrivateEndpoints funcRevokeGrantPrivilege func(ctx context.Context, serviceID string, accessType string, database *string, table *string, column *string, granteeUserName *string, granteeRoleName *string) (err error) - funcRevokeGrantPrivilegeOrigin string inspectFuncRevokeGrantPrivilege func(ctx context.Context, serviceID string, accessType string, database *string, table *string, column *string, granteeUserName *string, granteeRoleName *string) afterRevokeGrantPrivilegeCounter uint64 beforeRevokeGrantPrivilegeCounter uint64 RevokeGrantPrivilegeMock mClientMockRevokeGrantPrivilege funcRevokeGrantRole func(ctx context.Context, serviceID string, grantedRoleName string, granteeUserName *string, granteeRoleName *string) (err error) - funcRevokeGrantRoleOrigin string inspectFuncRevokeGrantRole func(ctx context.Context, serviceID string, grantedRoleName string, granteeUserName *string, granteeRoleName *string) afterRevokeGrantRoleCounter uint64 beforeRevokeGrantRoleCounter uint64 RevokeGrantRoleMock mClientMockRevokeGrantRole + funcRotateTDEKey func(ctx context.Context, serviceId string, keyId string) (err error) + inspectFuncRotateTDEKey func(ctx context.Context, serviceId string, keyId string) + afterRotateTDEKeyCounter uint64 + beforeRotateTDEKeyCounter uint64 + RotateTDEKeyMock mClientMockRotateTDEKey + funcScalingClickPipe func(ctx context.Context, serviceId string, clickPipeId string, request ClickPipeScaling) (cp1 *ClickPipe, err error) - funcScalingClickPipeOrigin string inspectFuncScalingClickPipe func(ctx context.Context, serviceId string, clickPipeId string, request ClickPipeScaling) afterScalingClickPipeCounter uint64 beforeScalingClickPipeCounter uint64 ScalingClickPipeMock mClientMockScalingClickPipe funcSyncDatabase func(ctx context.Context, serviceID string, db Database) (err error) - funcSyncDatabaseOrigin string inspectFuncSyncDatabase func(ctx context.Context, serviceID string, db Database) afterSyncDatabaseCounter uint64 beforeSyncDatabaseCounter uint64 SyncDatabaseMock mClientMockSyncDatabase funcUpdateBackupConfiguration func(ctx context.Context, serviceId string, b BackupConfiguration) (bp1 *BackupConfiguration, err error) - funcUpdateBackupConfigurationOrigin string inspectFuncUpdateBackupConfiguration func(ctx context.Context, serviceId string, b BackupConfiguration) afterUpdateBackupConfigurationCounter uint64 beforeUpdateBackupConfigurationCounter uint64 UpdateBackupConfigurationMock mClientMockUpdateBackupConfiguration funcUpdateClickPipe func(ctx context.Context, serviceId string, clickPipeId string, request ClickPipeUpdate) (cp1 *ClickPipe, err error) - funcUpdateClickPipeOrigin string inspectFuncUpdateClickPipe func(ctx context.Context, serviceId string, clickPipeId string, request ClickPipeUpdate) afterUpdateClickPipeCounter uint64 beforeUpdateClickPipeCounter uint64 UpdateClickPipeMock mClientMockUpdateClickPipe funcUpdateOrganizationPrivateEndpoints func(ctx context.Context, orgUpdate OrganizationUpdate) (pap1 *[]PrivateEndpoint, err error) - funcUpdateOrganizationPrivateEndpointsOrigin string inspectFuncUpdateOrganizationPrivateEndpoints func(ctx context.Context, orgUpdate OrganizationUpdate) afterUpdateOrganizationPrivateEndpointsCounter uint64 beforeUpdateOrganizationPrivateEndpointsCounter uint64 UpdateOrganizationPrivateEndpointsMock mClientMockUpdateOrganizationPrivateEndpoints funcUpdateReplicaScaling func(ctx context.Context, serviceId string, s ReplicaScalingUpdate) (sp1 *Service, err error) - funcUpdateReplicaScalingOrigin string inspectFuncUpdateReplicaScaling func(ctx context.Context, serviceId string, s ReplicaScalingUpdate) afterUpdateReplicaScalingCounter uint64 beforeUpdateReplicaScalingCounter uint64 UpdateReplicaScalingMock mClientMockUpdateReplicaScaling funcUpdateService func(ctx context.Context, serviceId string, s ServiceUpdate) (sp1 *Service, err error) - funcUpdateServiceOrigin string inspectFuncUpdateService func(ctx context.Context, serviceId string, s ServiceUpdate) afterUpdateServiceCounter uint64 beforeUpdateServiceCounter uint64 UpdateServiceMock mClientMockUpdateService funcUpdateServicePassword func(ctx context.Context, serviceId string, u ServicePasswordUpdate) (sp1 *ServicePasswordUpdateResult, err error) - funcUpdateServicePasswordOrigin string inspectFuncUpdateServicePassword func(ctx context.Context, serviceId string, u ServicePasswordUpdate) afterUpdateServicePasswordCounter uint64 beforeUpdateServicePasswordCounter uint64 UpdateServicePasswordMock mClientMockUpdateServicePassword funcWaitForClickPipeState func(ctx context.Context, serviceId string, clickPipeId string, stateChecker func(string) bool, maxWaitSeconds uint64) (cp1 *ClickPipe, err error) - funcWaitForClickPipeStateOrigin string inspectFuncWaitForClickPipeState func(ctx context.Context, serviceId string, clickPipeId string, stateChecker func(string) bool, maxWaitSeconds uint64) afterWaitForClickPipeStateCounter uint64 beforeWaitForClickPipeStateCounter uint64 WaitForClickPipeStateMock mClientMockWaitForClickPipeState funcWaitForReversePrivateEndpointState func(ctx context.Context, serviceId string, reversePrivateEndpointId string, stateChecker func(string) bool, maxWaitSeconds uint64) (rp1 *ReversePrivateEndpoint, err error) - funcWaitForReversePrivateEndpointStateOrigin string inspectFuncWaitForReversePrivateEndpointState func(ctx context.Context, serviceId string, reversePrivateEndpointId string, stateChecker func(string) bool, maxWaitSeconds uint64) afterWaitForReversePrivateEndpointStateCounter uint64 beforeWaitForReversePrivateEndpointStateCounter uint64 WaitForReversePrivateEndpointStateMock mClientMockWaitForReversePrivateEndpointState funcWaitForServiceState func(ctx context.Context, serviceId string, stateChecker func(string) bool, maxWaitSeconds int) (err error) - funcWaitForServiceStateOrigin string inspectFuncWaitForServiceState func(ctx context.Context, serviceId string, stateChecker func(string) bool, maxWaitSeconds int) afterWaitForServiceStateCounter uint64 beforeWaitForServiceStateCounter uint64 @@ -444,6 +405,9 @@ func NewClientMock(t minimock.Tester) *ClientMock { m.RevokeGrantRoleMock = mClientMockRevokeGrantRole{mock: m} m.RevokeGrantRoleMock.callArgs = []*ClientMockRevokeGrantRoleParams{} + m.RotateTDEKeyMock = mClientMockRotateTDEKey{mock: m} + m.RotateTDEKeyMock.callArgs = []*ClientMockRotateTDEKeyParams{} + m.ScalingClickPipeMock = mClientMockScalingClickPipe{mock: m} m.ScalingClickPipeMock.callArgs = []*ClientMockScalingClickPipeParams{} @@ -491,19 +455,16 @@ type mClientMockChangeClickPipeState struct { callArgs []*ClientMockChangeClickPipeStateParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockChangeClickPipeStateExpectation specifies expectation struct of the Client.ChangeClickPipeState type ClientMockChangeClickPipeStateExpectation struct { - mock *ClientMock - params *ClientMockChangeClickPipeStateParams - paramPtrs *ClientMockChangeClickPipeStateParamPtrs - expectationOrigins ClientMockChangeClickPipeStateExpectationOrigins - results *ClientMockChangeClickPipeStateResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockChangeClickPipeStateParams + paramPtrs *ClientMockChangeClickPipeStateParamPtrs + results *ClientMockChangeClickPipeStateResults + Counter uint64 } // ClientMockChangeClickPipeStateParams contains parameters of the Client.ChangeClickPipeState @@ -528,15 +489,6 @@ type ClientMockChangeClickPipeStateResults struct { err error } -// ClientMockChangeClickPipeStateOrigins contains origins of expectations of the Client.ChangeClickPipeState -type ClientMockChangeClickPipeStateExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originClickPipeId string - originCommand string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -562,7 +514,6 @@ func (mmChangeClickPipeState *mClientMockChangeClickPipeState) Expect(ctx contex } mmChangeClickPipeState.defaultExpectation.params = &ClientMockChangeClickPipeStateParams{ctx, serviceId, clickPipeId, command} - mmChangeClickPipeState.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmChangeClickPipeState.expectations { if minimock.Equal(e.params, mmChangeClickPipeState.defaultExpectation.params) { mmChangeClickPipeState.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmChangeClickPipeState.defaultExpectation.params) @@ -590,7 +541,6 @@ func (mmChangeClickPipeState *mClientMockChangeClickPipeState) ExpectCtxParam1(c mmChangeClickPipeState.defaultExpectation.paramPtrs = &ClientMockChangeClickPipeStateParamPtrs{} } mmChangeClickPipeState.defaultExpectation.paramPtrs.ctx = &ctx - mmChangeClickPipeState.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmChangeClickPipeState } @@ -613,7 +563,6 @@ func (mmChangeClickPipeState *mClientMockChangeClickPipeState) ExpectServiceIdPa mmChangeClickPipeState.defaultExpectation.paramPtrs = &ClientMockChangeClickPipeStateParamPtrs{} } mmChangeClickPipeState.defaultExpectation.paramPtrs.serviceId = &serviceId - mmChangeClickPipeState.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmChangeClickPipeState } @@ -636,7 +585,6 @@ func (mmChangeClickPipeState *mClientMockChangeClickPipeState) ExpectClickPipeId mmChangeClickPipeState.defaultExpectation.paramPtrs = &ClientMockChangeClickPipeStateParamPtrs{} } mmChangeClickPipeState.defaultExpectation.paramPtrs.clickPipeId = &clickPipeId - mmChangeClickPipeState.defaultExpectation.expectationOrigins.originClickPipeId = minimock.CallerInfo(1) return mmChangeClickPipeState } @@ -659,7 +607,6 @@ func (mmChangeClickPipeState *mClientMockChangeClickPipeState) ExpectCommandPara mmChangeClickPipeState.defaultExpectation.paramPtrs = &ClientMockChangeClickPipeStateParamPtrs{} } mmChangeClickPipeState.defaultExpectation.paramPtrs.command = &command - mmChangeClickPipeState.defaultExpectation.expectationOrigins.originCommand = minimock.CallerInfo(1) return mmChangeClickPipeState } @@ -685,7 +632,6 @@ func (mmChangeClickPipeState *mClientMockChangeClickPipeState) Return(cp1 *Click mmChangeClickPipeState.defaultExpectation = &ClientMockChangeClickPipeStateExpectation{mock: mmChangeClickPipeState.mock} } mmChangeClickPipeState.defaultExpectation.results = &ClientMockChangeClickPipeStateResults{cp1, err} - mmChangeClickPipeState.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmChangeClickPipeState.mock } @@ -700,7 +646,6 @@ func (mmChangeClickPipeState *mClientMockChangeClickPipeState) Set(f func(ctx co } mmChangeClickPipeState.mock.funcChangeClickPipeState = f - mmChangeClickPipeState.mock.funcChangeClickPipeStateOrigin = minimock.CallerInfo(1) return mmChangeClickPipeState.mock } @@ -712,9 +657,8 @@ func (mmChangeClickPipeState *mClientMockChangeClickPipeState) When(ctx context. } expectation := &ClientMockChangeClickPipeStateExpectation{ - mock: mmChangeClickPipeState.mock, - params: &ClientMockChangeClickPipeStateParams{ctx, serviceId, clickPipeId, command}, - expectationOrigins: ClientMockChangeClickPipeStateExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmChangeClickPipeState.mock, + params: &ClientMockChangeClickPipeStateParams{ctx, serviceId, clickPipeId, command}, } mmChangeClickPipeState.expectations = append(mmChangeClickPipeState.expectations, expectation) return expectation @@ -732,7 +676,6 @@ func (mmChangeClickPipeState *mClientMockChangeClickPipeState) Times(n uint64) * mmChangeClickPipeState.mock.t.Fatalf("Times of ClientMock.ChangeClickPipeState mock can not be zero") } mm_atomic.StoreUint64(&mmChangeClickPipeState.expectedInvocations, n) - mmChangeClickPipeState.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmChangeClickPipeState } @@ -752,8 +695,6 @@ func (mmChangeClickPipeState *ClientMock) ChangeClickPipeState(ctx context.Conte mm_atomic.AddUint64(&mmChangeClickPipeState.beforeChangeClickPipeStateCounter, 1) defer mm_atomic.AddUint64(&mmChangeClickPipeState.afterChangeClickPipeStateCounter, 1) - mmChangeClickPipeState.t.Helper() - if mmChangeClickPipeState.inspectFuncChangeClickPipeState != nil { mmChangeClickPipeState.inspectFuncChangeClickPipeState(ctx, serviceId, clickPipeId, command) } @@ -782,28 +723,23 @@ func (mmChangeClickPipeState *ClientMock) ChangeClickPipeState(ctx context.Conte if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmChangeClickPipeState.t.Errorf("ClientMock.ChangeClickPipeState got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmChangeClickPipeState.ChangeClickPipeStateMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmChangeClickPipeState.t.Errorf("ClientMock.ChangeClickPipeState got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmChangeClickPipeState.t.Errorf("ClientMock.ChangeClickPipeState got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmChangeClickPipeState.ChangeClickPipeStateMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmChangeClickPipeState.t.Errorf("ClientMock.ChangeClickPipeState got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.clickPipeId != nil && !minimock.Equal(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId) { - mmChangeClickPipeState.t.Errorf("ClientMock.ChangeClickPipeState got unexpected parameter clickPipeId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmChangeClickPipeState.ChangeClickPipeStateMock.defaultExpectation.expectationOrigins.originClickPipeId, *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) + mmChangeClickPipeState.t.Errorf("ClientMock.ChangeClickPipeState got unexpected parameter clickPipeId, want: %#v, got: %#v%s\n", *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) } if mm_want_ptrs.command != nil && !minimock.Equal(*mm_want_ptrs.command, mm_got.command) { - mmChangeClickPipeState.t.Errorf("ClientMock.ChangeClickPipeState got unexpected parameter command, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmChangeClickPipeState.ChangeClickPipeStateMock.defaultExpectation.expectationOrigins.originCommand, *mm_want_ptrs.command, mm_got.command, minimock.Diff(*mm_want_ptrs.command, mm_got.command)) + mmChangeClickPipeState.t.Errorf("ClientMock.ChangeClickPipeState got unexpected parameter command, want: %#v, got: %#v%s\n", *mm_want_ptrs.command, mm_got.command, minimock.Diff(*mm_want_ptrs.command, mm_got.command)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmChangeClickPipeState.t.Errorf("ClientMock.ChangeClickPipeState got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmChangeClickPipeState.ChangeClickPipeStateMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmChangeClickPipeState.t.Errorf("ClientMock.ChangeClickPipeState got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmChangeClickPipeState.ChangeClickPipeStateMock.defaultExpectation.results @@ -863,7 +799,7 @@ func (m *ClientMock) MinimockChangeClickPipeStateDone() bool { func (m *ClientMock) MinimockChangeClickPipeStateInspect() { for _, e := range m.ChangeClickPipeStateMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.ChangeClickPipeState at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.ChangeClickPipeState with params: %#v", *e.params) } } @@ -871,19 +807,19 @@ func (m *ClientMock) MinimockChangeClickPipeStateInspect() { // if default expectation was set then invocations count should be greater than zero if m.ChangeClickPipeStateMock.defaultExpectation != nil && afterChangeClickPipeStateCounter < 1 { if m.ChangeClickPipeStateMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.ChangeClickPipeState at\n%s", m.ChangeClickPipeStateMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.ChangeClickPipeState") } else { - m.t.Errorf("Expected call to ClientMock.ChangeClickPipeState at\n%s with params: %#v", m.ChangeClickPipeStateMock.defaultExpectation.expectationOrigins.origin, *m.ChangeClickPipeStateMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.ChangeClickPipeState with params: %#v", *m.ChangeClickPipeStateMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcChangeClickPipeState != nil && afterChangeClickPipeStateCounter < 1 { - m.t.Errorf("Expected call to ClientMock.ChangeClickPipeState at\n%s", m.funcChangeClickPipeStateOrigin) + m.t.Error("Expected call to ClientMock.ChangeClickPipeState") } if !m.ChangeClickPipeStateMock.invocationsDone() && afterChangeClickPipeStateCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.ChangeClickPipeState at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.ChangeClickPipeStateMock.expectedInvocations), m.ChangeClickPipeStateMock.expectedInvocationsOrigin, afterChangeClickPipeStateCounter) + m.t.Errorf("Expected %d calls to ClientMock.ChangeClickPipeState but found %d calls", + mm_atomic.LoadUint64(&m.ChangeClickPipeStateMock.expectedInvocations), afterChangeClickPipeStateCounter) } } @@ -896,19 +832,16 @@ type mClientMockCreateClickPipe struct { callArgs []*ClientMockCreateClickPipeParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockCreateClickPipeExpectation specifies expectation struct of the Client.CreateClickPipe type ClientMockCreateClickPipeExpectation struct { - mock *ClientMock - params *ClientMockCreateClickPipeParams - paramPtrs *ClientMockCreateClickPipeParamPtrs - expectationOrigins ClientMockCreateClickPipeExpectationOrigins - results *ClientMockCreateClickPipeResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockCreateClickPipeParams + paramPtrs *ClientMockCreateClickPipeParamPtrs + results *ClientMockCreateClickPipeResults + Counter uint64 } // ClientMockCreateClickPipeParams contains parameters of the Client.CreateClickPipe @@ -931,14 +864,6 @@ type ClientMockCreateClickPipeResults struct { err error } -// ClientMockCreateClickPipeOrigins contains origins of expectations of the Client.CreateClickPipe -type ClientMockCreateClickPipeExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originClickPipe string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -964,7 +889,6 @@ func (mmCreateClickPipe *mClientMockCreateClickPipe) Expect(ctx context.Context, } mmCreateClickPipe.defaultExpectation.params = &ClientMockCreateClickPipeParams{ctx, serviceId, clickPipe} - mmCreateClickPipe.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmCreateClickPipe.expectations { if minimock.Equal(e.params, mmCreateClickPipe.defaultExpectation.params) { mmCreateClickPipe.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmCreateClickPipe.defaultExpectation.params) @@ -992,7 +916,6 @@ func (mmCreateClickPipe *mClientMockCreateClickPipe) ExpectCtxParam1(ctx context mmCreateClickPipe.defaultExpectation.paramPtrs = &ClientMockCreateClickPipeParamPtrs{} } mmCreateClickPipe.defaultExpectation.paramPtrs.ctx = &ctx - mmCreateClickPipe.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmCreateClickPipe } @@ -1015,7 +938,6 @@ func (mmCreateClickPipe *mClientMockCreateClickPipe) ExpectServiceIdParam2(servi mmCreateClickPipe.defaultExpectation.paramPtrs = &ClientMockCreateClickPipeParamPtrs{} } mmCreateClickPipe.defaultExpectation.paramPtrs.serviceId = &serviceId - mmCreateClickPipe.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmCreateClickPipe } @@ -1038,7 +960,6 @@ func (mmCreateClickPipe *mClientMockCreateClickPipe) ExpectClickPipeParam3(click mmCreateClickPipe.defaultExpectation.paramPtrs = &ClientMockCreateClickPipeParamPtrs{} } mmCreateClickPipe.defaultExpectation.paramPtrs.clickPipe = &clickPipe - mmCreateClickPipe.defaultExpectation.expectationOrigins.originClickPipe = minimock.CallerInfo(1) return mmCreateClickPipe } @@ -1064,7 +985,6 @@ func (mmCreateClickPipe *mClientMockCreateClickPipe) Return(cp1 *ClickPipe, err mmCreateClickPipe.defaultExpectation = &ClientMockCreateClickPipeExpectation{mock: mmCreateClickPipe.mock} } mmCreateClickPipe.defaultExpectation.results = &ClientMockCreateClickPipeResults{cp1, err} - mmCreateClickPipe.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmCreateClickPipe.mock } @@ -1079,7 +999,6 @@ func (mmCreateClickPipe *mClientMockCreateClickPipe) Set(f func(ctx context.Cont } mmCreateClickPipe.mock.funcCreateClickPipe = f - mmCreateClickPipe.mock.funcCreateClickPipeOrigin = minimock.CallerInfo(1) return mmCreateClickPipe.mock } @@ -1091,9 +1010,8 @@ func (mmCreateClickPipe *mClientMockCreateClickPipe) When(ctx context.Context, s } expectation := &ClientMockCreateClickPipeExpectation{ - mock: mmCreateClickPipe.mock, - params: &ClientMockCreateClickPipeParams{ctx, serviceId, clickPipe}, - expectationOrigins: ClientMockCreateClickPipeExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmCreateClickPipe.mock, + params: &ClientMockCreateClickPipeParams{ctx, serviceId, clickPipe}, } mmCreateClickPipe.expectations = append(mmCreateClickPipe.expectations, expectation) return expectation @@ -1111,7 +1029,6 @@ func (mmCreateClickPipe *mClientMockCreateClickPipe) Times(n uint64) *mClientMoc mmCreateClickPipe.mock.t.Fatalf("Times of ClientMock.CreateClickPipe mock can not be zero") } mm_atomic.StoreUint64(&mmCreateClickPipe.expectedInvocations, n) - mmCreateClickPipe.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmCreateClickPipe } @@ -1131,8 +1048,6 @@ func (mmCreateClickPipe *ClientMock) CreateClickPipe(ctx context.Context, servic mm_atomic.AddUint64(&mmCreateClickPipe.beforeCreateClickPipeCounter, 1) defer mm_atomic.AddUint64(&mmCreateClickPipe.afterCreateClickPipeCounter, 1) - mmCreateClickPipe.t.Helper() - if mmCreateClickPipe.inspectFuncCreateClickPipe != nil { mmCreateClickPipe.inspectFuncCreateClickPipe(ctx, serviceId, clickPipe) } @@ -1161,23 +1076,19 @@ func (mmCreateClickPipe *ClientMock) CreateClickPipe(ctx context.Context, servic if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmCreateClickPipe.t.Errorf("ClientMock.CreateClickPipe got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateClickPipe.CreateClickPipeMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmCreateClickPipe.t.Errorf("ClientMock.CreateClickPipe got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmCreateClickPipe.t.Errorf("ClientMock.CreateClickPipe got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateClickPipe.CreateClickPipeMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmCreateClickPipe.t.Errorf("ClientMock.CreateClickPipe got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.clickPipe != nil && !minimock.Equal(*mm_want_ptrs.clickPipe, mm_got.clickPipe) { - mmCreateClickPipe.t.Errorf("ClientMock.CreateClickPipe got unexpected parameter clickPipe, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateClickPipe.CreateClickPipeMock.defaultExpectation.expectationOrigins.originClickPipe, *mm_want_ptrs.clickPipe, mm_got.clickPipe, minimock.Diff(*mm_want_ptrs.clickPipe, mm_got.clickPipe)) + mmCreateClickPipe.t.Errorf("ClientMock.CreateClickPipe got unexpected parameter clickPipe, want: %#v, got: %#v%s\n", *mm_want_ptrs.clickPipe, mm_got.clickPipe, minimock.Diff(*mm_want_ptrs.clickPipe, mm_got.clickPipe)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmCreateClickPipe.t.Errorf("ClientMock.CreateClickPipe got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateClickPipe.CreateClickPipeMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmCreateClickPipe.t.Errorf("ClientMock.CreateClickPipe got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmCreateClickPipe.CreateClickPipeMock.defaultExpectation.results @@ -1237,7 +1148,7 @@ func (m *ClientMock) MinimockCreateClickPipeDone() bool { func (m *ClientMock) MinimockCreateClickPipeInspect() { for _, e := range m.CreateClickPipeMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.CreateClickPipe at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.CreateClickPipe with params: %#v", *e.params) } } @@ -1245,19 +1156,19 @@ func (m *ClientMock) MinimockCreateClickPipeInspect() { // if default expectation was set then invocations count should be greater than zero if m.CreateClickPipeMock.defaultExpectation != nil && afterCreateClickPipeCounter < 1 { if m.CreateClickPipeMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.CreateClickPipe at\n%s", m.CreateClickPipeMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.CreateClickPipe") } else { - m.t.Errorf("Expected call to ClientMock.CreateClickPipe at\n%s with params: %#v", m.CreateClickPipeMock.defaultExpectation.expectationOrigins.origin, *m.CreateClickPipeMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.CreateClickPipe with params: %#v", *m.CreateClickPipeMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcCreateClickPipe != nil && afterCreateClickPipeCounter < 1 { - m.t.Errorf("Expected call to ClientMock.CreateClickPipe at\n%s", m.funcCreateClickPipeOrigin) + m.t.Error("Expected call to ClientMock.CreateClickPipe") } if !m.CreateClickPipeMock.invocationsDone() && afterCreateClickPipeCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.CreateClickPipe at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.CreateClickPipeMock.expectedInvocations), m.CreateClickPipeMock.expectedInvocationsOrigin, afterCreateClickPipeCounter) + m.t.Errorf("Expected %d calls to ClientMock.CreateClickPipe but found %d calls", + mm_atomic.LoadUint64(&m.CreateClickPipeMock.expectedInvocations), afterCreateClickPipeCounter) } } @@ -1270,19 +1181,16 @@ type mClientMockCreateDatabase struct { callArgs []*ClientMockCreateDatabaseParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockCreateDatabaseExpectation specifies expectation struct of the Client.CreateDatabase type ClientMockCreateDatabaseExpectation struct { - mock *ClientMock - params *ClientMockCreateDatabaseParams - paramPtrs *ClientMockCreateDatabaseParamPtrs - expectationOrigins ClientMockCreateDatabaseExpectationOrigins - results *ClientMockCreateDatabaseResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockCreateDatabaseParams + paramPtrs *ClientMockCreateDatabaseParamPtrs + results *ClientMockCreateDatabaseResults + Counter uint64 } // ClientMockCreateDatabaseParams contains parameters of the Client.CreateDatabase @@ -1304,14 +1212,6 @@ type ClientMockCreateDatabaseResults struct { err error } -// ClientMockCreateDatabaseOrigins contains origins of expectations of the Client.CreateDatabase -type ClientMockCreateDatabaseExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originDb string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -1337,7 +1237,6 @@ func (mmCreateDatabase *mClientMockCreateDatabase) Expect(ctx context.Context, s } mmCreateDatabase.defaultExpectation.params = &ClientMockCreateDatabaseParams{ctx, serviceID, db} - mmCreateDatabase.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmCreateDatabase.expectations { if minimock.Equal(e.params, mmCreateDatabase.defaultExpectation.params) { mmCreateDatabase.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmCreateDatabase.defaultExpectation.params) @@ -1365,7 +1264,6 @@ func (mmCreateDatabase *mClientMockCreateDatabase) ExpectCtxParam1(ctx context.C mmCreateDatabase.defaultExpectation.paramPtrs = &ClientMockCreateDatabaseParamPtrs{} } mmCreateDatabase.defaultExpectation.paramPtrs.ctx = &ctx - mmCreateDatabase.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmCreateDatabase } @@ -1388,7 +1286,6 @@ func (mmCreateDatabase *mClientMockCreateDatabase) ExpectServiceIDParam2(service mmCreateDatabase.defaultExpectation.paramPtrs = &ClientMockCreateDatabaseParamPtrs{} } mmCreateDatabase.defaultExpectation.paramPtrs.serviceID = &serviceID - mmCreateDatabase.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmCreateDatabase } @@ -1411,7 +1308,6 @@ func (mmCreateDatabase *mClientMockCreateDatabase) ExpectDbParam3(db Database) * mmCreateDatabase.defaultExpectation.paramPtrs = &ClientMockCreateDatabaseParamPtrs{} } mmCreateDatabase.defaultExpectation.paramPtrs.db = &db - mmCreateDatabase.defaultExpectation.expectationOrigins.originDb = minimock.CallerInfo(1) return mmCreateDatabase } @@ -1437,7 +1333,6 @@ func (mmCreateDatabase *mClientMockCreateDatabase) Return(err error) *ClientMock mmCreateDatabase.defaultExpectation = &ClientMockCreateDatabaseExpectation{mock: mmCreateDatabase.mock} } mmCreateDatabase.defaultExpectation.results = &ClientMockCreateDatabaseResults{err} - mmCreateDatabase.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmCreateDatabase.mock } @@ -1452,7 +1347,6 @@ func (mmCreateDatabase *mClientMockCreateDatabase) Set(f func(ctx context.Contex } mmCreateDatabase.mock.funcCreateDatabase = f - mmCreateDatabase.mock.funcCreateDatabaseOrigin = minimock.CallerInfo(1) return mmCreateDatabase.mock } @@ -1464,9 +1358,8 @@ func (mmCreateDatabase *mClientMockCreateDatabase) When(ctx context.Context, ser } expectation := &ClientMockCreateDatabaseExpectation{ - mock: mmCreateDatabase.mock, - params: &ClientMockCreateDatabaseParams{ctx, serviceID, db}, - expectationOrigins: ClientMockCreateDatabaseExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmCreateDatabase.mock, + params: &ClientMockCreateDatabaseParams{ctx, serviceID, db}, } mmCreateDatabase.expectations = append(mmCreateDatabase.expectations, expectation) return expectation @@ -1484,7 +1377,6 @@ func (mmCreateDatabase *mClientMockCreateDatabase) Times(n uint64) *mClientMockC mmCreateDatabase.mock.t.Fatalf("Times of ClientMock.CreateDatabase mock can not be zero") } mm_atomic.StoreUint64(&mmCreateDatabase.expectedInvocations, n) - mmCreateDatabase.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmCreateDatabase } @@ -1504,8 +1396,6 @@ func (mmCreateDatabase *ClientMock) CreateDatabase(ctx context.Context, serviceI mm_atomic.AddUint64(&mmCreateDatabase.beforeCreateDatabaseCounter, 1) defer mm_atomic.AddUint64(&mmCreateDatabase.afterCreateDatabaseCounter, 1) - mmCreateDatabase.t.Helper() - if mmCreateDatabase.inspectFuncCreateDatabase != nil { mmCreateDatabase.inspectFuncCreateDatabase(ctx, serviceID, db) } @@ -1534,23 +1424,19 @@ func (mmCreateDatabase *ClientMock) CreateDatabase(ctx context.Context, serviceI if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmCreateDatabase.t.Errorf("ClientMock.CreateDatabase got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateDatabase.CreateDatabaseMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmCreateDatabase.t.Errorf("ClientMock.CreateDatabase got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmCreateDatabase.t.Errorf("ClientMock.CreateDatabase got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateDatabase.CreateDatabaseMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmCreateDatabase.t.Errorf("ClientMock.CreateDatabase got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.db != nil && !minimock.Equal(*mm_want_ptrs.db, mm_got.db) { - mmCreateDatabase.t.Errorf("ClientMock.CreateDatabase got unexpected parameter db, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateDatabase.CreateDatabaseMock.defaultExpectation.expectationOrigins.originDb, *mm_want_ptrs.db, mm_got.db, minimock.Diff(*mm_want_ptrs.db, mm_got.db)) + mmCreateDatabase.t.Errorf("ClientMock.CreateDatabase got unexpected parameter db, want: %#v, got: %#v%s\n", *mm_want_ptrs.db, mm_got.db, minimock.Diff(*mm_want_ptrs.db, mm_got.db)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmCreateDatabase.t.Errorf("ClientMock.CreateDatabase got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateDatabase.CreateDatabaseMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmCreateDatabase.t.Errorf("ClientMock.CreateDatabase got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmCreateDatabase.CreateDatabaseMock.defaultExpectation.results @@ -1610,7 +1496,7 @@ func (m *ClientMock) MinimockCreateDatabaseDone() bool { func (m *ClientMock) MinimockCreateDatabaseInspect() { for _, e := range m.CreateDatabaseMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.CreateDatabase at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.CreateDatabase with params: %#v", *e.params) } } @@ -1618,19 +1504,19 @@ func (m *ClientMock) MinimockCreateDatabaseInspect() { // if default expectation was set then invocations count should be greater than zero if m.CreateDatabaseMock.defaultExpectation != nil && afterCreateDatabaseCounter < 1 { if m.CreateDatabaseMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.CreateDatabase at\n%s", m.CreateDatabaseMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.CreateDatabase") } else { - m.t.Errorf("Expected call to ClientMock.CreateDatabase at\n%s with params: %#v", m.CreateDatabaseMock.defaultExpectation.expectationOrigins.origin, *m.CreateDatabaseMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.CreateDatabase with params: %#v", *m.CreateDatabaseMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcCreateDatabase != nil && afterCreateDatabaseCounter < 1 { - m.t.Errorf("Expected call to ClientMock.CreateDatabase at\n%s", m.funcCreateDatabaseOrigin) + m.t.Error("Expected call to ClientMock.CreateDatabase") } if !m.CreateDatabaseMock.invocationsDone() && afterCreateDatabaseCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.CreateDatabase at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.CreateDatabaseMock.expectedInvocations), m.CreateDatabaseMock.expectedInvocationsOrigin, afterCreateDatabaseCounter) + m.t.Errorf("Expected %d calls to ClientMock.CreateDatabase but found %d calls", + mm_atomic.LoadUint64(&m.CreateDatabaseMock.expectedInvocations), afterCreateDatabaseCounter) } } @@ -1643,19 +1529,16 @@ type mClientMockCreateQueryEndpoint struct { callArgs []*ClientMockCreateQueryEndpointParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockCreateQueryEndpointExpectation specifies expectation struct of the Client.CreateQueryEndpoint type ClientMockCreateQueryEndpointExpectation struct { - mock *ClientMock - params *ClientMockCreateQueryEndpointParams - paramPtrs *ClientMockCreateQueryEndpointParamPtrs - expectationOrigins ClientMockCreateQueryEndpointExpectationOrigins - results *ClientMockCreateQueryEndpointResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockCreateQueryEndpointParams + paramPtrs *ClientMockCreateQueryEndpointParamPtrs + results *ClientMockCreateQueryEndpointResults + Counter uint64 } // ClientMockCreateQueryEndpointParams contains parameters of the Client.CreateQueryEndpoint @@ -1678,14 +1561,6 @@ type ClientMockCreateQueryEndpointResults struct { err error } -// ClientMockCreateQueryEndpointOrigins contains origins of expectations of the Client.CreateQueryEndpoint -type ClientMockCreateQueryEndpointExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originEndpoint string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -1711,7 +1586,6 @@ func (mmCreateQueryEndpoint *mClientMockCreateQueryEndpoint) Expect(ctx context. } mmCreateQueryEndpoint.defaultExpectation.params = &ClientMockCreateQueryEndpointParams{ctx, serviceID, endpoint} - mmCreateQueryEndpoint.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmCreateQueryEndpoint.expectations { if minimock.Equal(e.params, mmCreateQueryEndpoint.defaultExpectation.params) { mmCreateQueryEndpoint.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmCreateQueryEndpoint.defaultExpectation.params) @@ -1739,7 +1613,6 @@ func (mmCreateQueryEndpoint *mClientMockCreateQueryEndpoint) ExpectCtxParam1(ctx mmCreateQueryEndpoint.defaultExpectation.paramPtrs = &ClientMockCreateQueryEndpointParamPtrs{} } mmCreateQueryEndpoint.defaultExpectation.paramPtrs.ctx = &ctx - mmCreateQueryEndpoint.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmCreateQueryEndpoint } @@ -1762,7 +1635,6 @@ func (mmCreateQueryEndpoint *mClientMockCreateQueryEndpoint) ExpectServiceIDPara mmCreateQueryEndpoint.defaultExpectation.paramPtrs = &ClientMockCreateQueryEndpointParamPtrs{} } mmCreateQueryEndpoint.defaultExpectation.paramPtrs.serviceID = &serviceID - mmCreateQueryEndpoint.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmCreateQueryEndpoint } @@ -1785,7 +1657,6 @@ func (mmCreateQueryEndpoint *mClientMockCreateQueryEndpoint) ExpectEndpointParam mmCreateQueryEndpoint.defaultExpectation.paramPtrs = &ClientMockCreateQueryEndpointParamPtrs{} } mmCreateQueryEndpoint.defaultExpectation.paramPtrs.endpoint = &endpoint - mmCreateQueryEndpoint.defaultExpectation.expectationOrigins.originEndpoint = minimock.CallerInfo(1) return mmCreateQueryEndpoint } @@ -1811,7 +1682,6 @@ func (mmCreateQueryEndpoint *mClientMockCreateQueryEndpoint) Return(sp1 *Service mmCreateQueryEndpoint.defaultExpectation = &ClientMockCreateQueryEndpointExpectation{mock: mmCreateQueryEndpoint.mock} } mmCreateQueryEndpoint.defaultExpectation.results = &ClientMockCreateQueryEndpointResults{sp1, err} - mmCreateQueryEndpoint.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmCreateQueryEndpoint.mock } @@ -1826,7 +1696,6 @@ func (mmCreateQueryEndpoint *mClientMockCreateQueryEndpoint) Set(f func(ctx cont } mmCreateQueryEndpoint.mock.funcCreateQueryEndpoint = f - mmCreateQueryEndpoint.mock.funcCreateQueryEndpointOrigin = minimock.CallerInfo(1) return mmCreateQueryEndpoint.mock } @@ -1838,9 +1707,8 @@ func (mmCreateQueryEndpoint *mClientMockCreateQueryEndpoint) When(ctx context.Co } expectation := &ClientMockCreateQueryEndpointExpectation{ - mock: mmCreateQueryEndpoint.mock, - params: &ClientMockCreateQueryEndpointParams{ctx, serviceID, endpoint}, - expectationOrigins: ClientMockCreateQueryEndpointExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmCreateQueryEndpoint.mock, + params: &ClientMockCreateQueryEndpointParams{ctx, serviceID, endpoint}, } mmCreateQueryEndpoint.expectations = append(mmCreateQueryEndpoint.expectations, expectation) return expectation @@ -1858,7 +1726,6 @@ func (mmCreateQueryEndpoint *mClientMockCreateQueryEndpoint) Times(n uint64) *mC mmCreateQueryEndpoint.mock.t.Fatalf("Times of ClientMock.CreateQueryEndpoint mock can not be zero") } mm_atomic.StoreUint64(&mmCreateQueryEndpoint.expectedInvocations, n) - mmCreateQueryEndpoint.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmCreateQueryEndpoint } @@ -1878,8 +1745,6 @@ func (mmCreateQueryEndpoint *ClientMock) CreateQueryEndpoint(ctx context.Context mm_atomic.AddUint64(&mmCreateQueryEndpoint.beforeCreateQueryEndpointCounter, 1) defer mm_atomic.AddUint64(&mmCreateQueryEndpoint.afterCreateQueryEndpointCounter, 1) - mmCreateQueryEndpoint.t.Helper() - if mmCreateQueryEndpoint.inspectFuncCreateQueryEndpoint != nil { mmCreateQueryEndpoint.inspectFuncCreateQueryEndpoint(ctx, serviceID, endpoint) } @@ -1908,23 +1773,19 @@ func (mmCreateQueryEndpoint *ClientMock) CreateQueryEndpoint(ctx context.Context if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmCreateQueryEndpoint.t.Errorf("ClientMock.CreateQueryEndpoint got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateQueryEndpoint.CreateQueryEndpointMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmCreateQueryEndpoint.t.Errorf("ClientMock.CreateQueryEndpoint got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmCreateQueryEndpoint.t.Errorf("ClientMock.CreateQueryEndpoint got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateQueryEndpoint.CreateQueryEndpointMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmCreateQueryEndpoint.t.Errorf("ClientMock.CreateQueryEndpoint got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.endpoint != nil && !minimock.Equal(*mm_want_ptrs.endpoint, mm_got.endpoint) { - mmCreateQueryEndpoint.t.Errorf("ClientMock.CreateQueryEndpoint got unexpected parameter endpoint, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateQueryEndpoint.CreateQueryEndpointMock.defaultExpectation.expectationOrigins.originEndpoint, *mm_want_ptrs.endpoint, mm_got.endpoint, minimock.Diff(*mm_want_ptrs.endpoint, mm_got.endpoint)) + mmCreateQueryEndpoint.t.Errorf("ClientMock.CreateQueryEndpoint got unexpected parameter endpoint, want: %#v, got: %#v%s\n", *mm_want_ptrs.endpoint, mm_got.endpoint, minimock.Diff(*mm_want_ptrs.endpoint, mm_got.endpoint)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmCreateQueryEndpoint.t.Errorf("ClientMock.CreateQueryEndpoint got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateQueryEndpoint.CreateQueryEndpointMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmCreateQueryEndpoint.t.Errorf("ClientMock.CreateQueryEndpoint got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmCreateQueryEndpoint.CreateQueryEndpointMock.defaultExpectation.results @@ -1984,7 +1845,7 @@ func (m *ClientMock) MinimockCreateQueryEndpointDone() bool { func (m *ClientMock) MinimockCreateQueryEndpointInspect() { for _, e := range m.CreateQueryEndpointMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.CreateQueryEndpoint at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.CreateQueryEndpoint with params: %#v", *e.params) } } @@ -1992,19 +1853,19 @@ func (m *ClientMock) MinimockCreateQueryEndpointInspect() { // if default expectation was set then invocations count should be greater than zero if m.CreateQueryEndpointMock.defaultExpectation != nil && afterCreateQueryEndpointCounter < 1 { if m.CreateQueryEndpointMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.CreateQueryEndpoint at\n%s", m.CreateQueryEndpointMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.CreateQueryEndpoint") } else { - m.t.Errorf("Expected call to ClientMock.CreateQueryEndpoint at\n%s with params: %#v", m.CreateQueryEndpointMock.defaultExpectation.expectationOrigins.origin, *m.CreateQueryEndpointMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.CreateQueryEndpoint with params: %#v", *m.CreateQueryEndpointMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcCreateQueryEndpoint != nil && afterCreateQueryEndpointCounter < 1 { - m.t.Errorf("Expected call to ClientMock.CreateQueryEndpoint at\n%s", m.funcCreateQueryEndpointOrigin) + m.t.Error("Expected call to ClientMock.CreateQueryEndpoint") } if !m.CreateQueryEndpointMock.invocationsDone() && afterCreateQueryEndpointCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.CreateQueryEndpoint at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.CreateQueryEndpointMock.expectedInvocations), m.CreateQueryEndpointMock.expectedInvocationsOrigin, afterCreateQueryEndpointCounter) + m.t.Errorf("Expected %d calls to ClientMock.CreateQueryEndpoint but found %d calls", + mm_atomic.LoadUint64(&m.CreateQueryEndpointMock.expectedInvocations), afterCreateQueryEndpointCounter) } } @@ -2017,19 +1878,16 @@ type mClientMockCreateReversePrivateEndpoint struct { callArgs []*ClientMockCreateReversePrivateEndpointParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockCreateReversePrivateEndpointExpectation specifies expectation struct of the Client.CreateReversePrivateEndpoint type ClientMockCreateReversePrivateEndpointExpectation struct { - mock *ClientMock - params *ClientMockCreateReversePrivateEndpointParams - paramPtrs *ClientMockCreateReversePrivateEndpointParamPtrs - expectationOrigins ClientMockCreateReversePrivateEndpointExpectationOrigins - results *ClientMockCreateReversePrivateEndpointResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockCreateReversePrivateEndpointParams + paramPtrs *ClientMockCreateReversePrivateEndpointParamPtrs + results *ClientMockCreateReversePrivateEndpointResults + Counter uint64 } // ClientMockCreateReversePrivateEndpointParams contains parameters of the Client.CreateReversePrivateEndpoint @@ -2052,14 +1910,6 @@ type ClientMockCreateReversePrivateEndpointResults struct { err error } -// ClientMockCreateReversePrivateEndpointOrigins contains origins of expectations of the Client.CreateReversePrivateEndpoint -type ClientMockCreateReversePrivateEndpointExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originRequest string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -2085,7 +1935,6 @@ func (mmCreateReversePrivateEndpoint *mClientMockCreateReversePrivateEndpoint) E } mmCreateReversePrivateEndpoint.defaultExpectation.params = &ClientMockCreateReversePrivateEndpointParams{ctx, serviceId, request} - mmCreateReversePrivateEndpoint.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmCreateReversePrivateEndpoint.expectations { if minimock.Equal(e.params, mmCreateReversePrivateEndpoint.defaultExpectation.params) { mmCreateReversePrivateEndpoint.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmCreateReversePrivateEndpoint.defaultExpectation.params) @@ -2113,7 +1962,6 @@ func (mmCreateReversePrivateEndpoint *mClientMockCreateReversePrivateEndpoint) E mmCreateReversePrivateEndpoint.defaultExpectation.paramPtrs = &ClientMockCreateReversePrivateEndpointParamPtrs{} } mmCreateReversePrivateEndpoint.defaultExpectation.paramPtrs.ctx = &ctx - mmCreateReversePrivateEndpoint.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmCreateReversePrivateEndpoint } @@ -2136,7 +1984,6 @@ func (mmCreateReversePrivateEndpoint *mClientMockCreateReversePrivateEndpoint) E mmCreateReversePrivateEndpoint.defaultExpectation.paramPtrs = &ClientMockCreateReversePrivateEndpointParamPtrs{} } mmCreateReversePrivateEndpoint.defaultExpectation.paramPtrs.serviceId = &serviceId - mmCreateReversePrivateEndpoint.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmCreateReversePrivateEndpoint } @@ -2159,7 +2006,6 @@ func (mmCreateReversePrivateEndpoint *mClientMockCreateReversePrivateEndpoint) E mmCreateReversePrivateEndpoint.defaultExpectation.paramPtrs = &ClientMockCreateReversePrivateEndpointParamPtrs{} } mmCreateReversePrivateEndpoint.defaultExpectation.paramPtrs.request = &request - mmCreateReversePrivateEndpoint.defaultExpectation.expectationOrigins.originRequest = minimock.CallerInfo(1) return mmCreateReversePrivateEndpoint } @@ -2185,7 +2031,6 @@ func (mmCreateReversePrivateEndpoint *mClientMockCreateReversePrivateEndpoint) R mmCreateReversePrivateEndpoint.defaultExpectation = &ClientMockCreateReversePrivateEndpointExpectation{mock: mmCreateReversePrivateEndpoint.mock} } mmCreateReversePrivateEndpoint.defaultExpectation.results = &ClientMockCreateReversePrivateEndpointResults{rp1, err} - mmCreateReversePrivateEndpoint.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmCreateReversePrivateEndpoint.mock } @@ -2200,7 +2045,6 @@ func (mmCreateReversePrivateEndpoint *mClientMockCreateReversePrivateEndpoint) S } mmCreateReversePrivateEndpoint.mock.funcCreateReversePrivateEndpoint = f - mmCreateReversePrivateEndpoint.mock.funcCreateReversePrivateEndpointOrigin = minimock.CallerInfo(1) return mmCreateReversePrivateEndpoint.mock } @@ -2212,9 +2056,8 @@ func (mmCreateReversePrivateEndpoint *mClientMockCreateReversePrivateEndpoint) W } expectation := &ClientMockCreateReversePrivateEndpointExpectation{ - mock: mmCreateReversePrivateEndpoint.mock, - params: &ClientMockCreateReversePrivateEndpointParams{ctx, serviceId, request}, - expectationOrigins: ClientMockCreateReversePrivateEndpointExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmCreateReversePrivateEndpoint.mock, + params: &ClientMockCreateReversePrivateEndpointParams{ctx, serviceId, request}, } mmCreateReversePrivateEndpoint.expectations = append(mmCreateReversePrivateEndpoint.expectations, expectation) return expectation @@ -2232,7 +2075,6 @@ func (mmCreateReversePrivateEndpoint *mClientMockCreateReversePrivateEndpoint) T mmCreateReversePrivateEndpoint.mock.t.Fatalf("Times of ClientMock.CreateReversePrivateEndpoint mock can not be zero") } mm_atomic.StoreUint64(&mmCreateReversePrivateEndpoint.expectedInvocations, n) - mmCreateReversePrivateEndpoint.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmCreateReversePrivateEndpoint } @@ -2252,8 +2094,6 @@ func (mmCreateReversePrivateEndpoint *ClientMock) CreateReversePrivateEndpoint(c mm_atomic.AddUint64(&mmCreateReversePrivateEndpoint.beforeCreateReversePrivateEndpointCounter, 1) defer mm_atomic.AddUint64(&mmCreateReversePrivateEndpoint.afterCreateReversePrivateEndpointCounter, 1) - mmCreateReversePrivateEndpoint.t.Helper() - if mmCreateReversePrivateEndpoint.inspectFuncCreateReversePrivateEndpoint != nil { mmCreateReversePrivateEndpoint.inspectFuncCreateReversePrivateEndpoint(ctx, serviceId, request) } @@ -2282,23 +2122,19 @@ func (mmCreateReversePrivateEndpoint *ClientMock) CreateReversePrivateEndpoint(c if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmCreateReversePrivateEndpoint.t.Errorf("ClientMock.CreateReversePrivateEndpoint got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateReversePrivateEndpoint.CreateReversePrivateEndpointMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmCreateReversePrivateEndpoint.t.Errorf("ClientMock.CreateReversePrivateEndpoint got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmCreateReversePrivateEndpoint.t.Errorf("ClientMock.CreateReversePrivateEndpoint got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateReversePrivateEndpoint.CreateReversePrivateEndpointMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmCreateReversePrivateEndpoint.t.Errorf("ClientMock.CreateReversePrivateEndpoint got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.request != nil && !minimock.Equal(*mm_want_ptrs.request, mm_got.request) { - mmCreateReversePrivateEndpoint.t.Errorf("ClientMock.CreateReversePrivateEndpoint got unexpected parameter request, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateReversePrivateEndpoint.CreateReversePrivateEndpointMock.defaultExpectation.expectationOrigins.originRequest, *mm_want_ptrs.request, mm_got.request, minimock.Diff(*mm_want_ptrs.request, mm_got.request)) + mmCreateReversePrivateEndpoint.t.Errorf("ClientMock.CreateReversePrivateEndpoint got unexpected parameter request, want: %#v, got: %#v%s\n", *mm_want_ptrs.request, mm_got.request, minimock.Diff(*mm_want_ptrs.request, mm_got.request)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmCreateReversePrivateEndpoint.t.Errorf("ClientMock.CreateReversePrivateEndpoint got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateReversePrivateEndpoint.CreateReversePrivateEndpointMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmCreateReversePrivateEndpoint.t.Errorf("ClientMock.CreateReversePrivateEndpoint got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmCreateReversePrivateEndpoint.CreateReversePrivateEndpointMock.defaultExpectation.results @@ -2358,7 +2194,7 @@ func (m *ClientMock) MinimockCreateReversePrivateEndpointDone() bool { func (m *ClientMock) MinimockCreateReversePrivateEndpointInspect() { for _, e := range m.CreateReversePrivateEndpointMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.CreateReversePrivateEndpoint at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.CreateReversePrivateEndpoint with params: %#v", *e.params) } } @@ -2366,19 +2202,19 @@ func (m *ClientMock) MinimockCreateReversePrivateEndpointInspect() { // if default expectation was set then invocations count should be greater than zero if m.CreateReversePrivateEndpointMock.defaultExpectation != nil && afterCreateReversePrivateEndpointCounter < 1 { if m.CreateReversePrivateEndpointMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.CreateReversePrivateEndpoint at\n%s", m.CreateReversePrivateEndpointMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.CreateReversePrivateEndpoint") } else { - m.t.Errorf("Expected call to ClientMock.CreateReversePrivateEndpoint at\n%s with params: %#v", m.CreateReversePrivateEndpointMock.defaultExpectation.expectationOrigins.origin, *m.CreateReversePrivateEndpointMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.CreateReversePrivateEndpoint with params: %#v", *m.CreateReversePrivateEndpointMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcCreateReversePrivateEndpoint != nil && afterCreateReversePrivateEndpointCounter < 1 { - m.t.Errorf("Expected call to ClientMock.CreateReversePrivateEndpoint at\n%s", m.funcCreateReversePrivateEndpointOrigin) + m.t.Error("Expected call to ClientMock.CreateReversePrivateEndpoint") } if !m.CreateReversePrivateEndpointMock.invocationsDone() && afterCreateReversePrivateEndpointCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.CreateReversePrivateEndpoint at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.CreateReversePrivateEndpointMock.expectedInvocations), m.CreateReversePrivateEndpointMock.expectedInvocationsOrigin, afterCreateReversePrivateEndpointCounter) + m.t.Errorf("Expected %d calls to ClientMock.CreateReversePrivateEndpoint but found %d calls", + mm_atomic.LoadUint64(&m.CreateReversePrivateEndpointMock.expectedInvocations), afterCreateReversePrivateEndpointCounter) } } @@ -2391,19 +2227,16 @@ type mClientMockCreateRole struct { callArgs []*ClientMockCreateRoleParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockCreateRoleExpectation specifies expectation struct of the Client.CreateRole type ClientMockCreateRoleExpectation struct { - mock *ClientMock - params *ClientMockCreateRoleParams - paramPtrs *ClientMockCreateRoleParamPtrs - expectationOrigins ClientMockCreateRoleExpectationOrigins - results *ClientMockCreateRoleResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockCreateRoleParams + paramPtrs *ClientMockCreateRoleParamPtrs + results *ClientMockCreateRoleResults + Counter uint64 } // ClientMockCreateRoleParams contains parameters of the Client.CreateRole @@ -2426,14 +2259,6 @@ type ClientMockCreateRoleResults struct { err error } -// ClientMockCreateRoleOrigins contains origins of expectations of the Client.CreateRole -type ClientMockCreateRoleExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originRole string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -2459,7 +2284,6 @@ func (mmCreateRole *mClientMockCreateRole) Expect(ctx context.Context, serviceId } mmCreateRole.defaultExpectation.params = &ClientMockCreateRoleParams{ctx, serviceId, role} - mmCreateRole.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmCreateRole.expectations { if minimock.Equal(e.params, mmCreateRole.defaultExpectation.params) { mmCreateRole.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmCreateRole.defaultExpectation.params) @@ -2487,7 +2311,6 @@ func (mmCreateRole *mClientMockCreateRole) ExpectCtxParam1(ctx context.Context) mmCreateRole.defaultExpectation.paramPtrs = &ClientMockCreateRoleParamPtrs{} } mmCreateRole.defaultExpectation.paramPtrs.ctx = &ctx - mmCreateRole.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmCreateRole } @@ -2510,7 +2333,6 @@ func (mmCreateRole *mClientMockCreateRole) ExpectServiceIdParam2(serviceId strin mmCreateRole.defaultExpectation.paramPtrs = &ClientMockCreateRoleParamPtrs{} } mmCreateRole.defaultExpectation.paramPtrs.serviceId = &serviceId - mmCreateRole.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmCreateRole } @@ -2533,7 +2355,6 @@ func (mmCreateRole *mClientMockCreateRole) ExpectRoleParam3(role Role) *mClientM mmCreateRole.defaultExpectation.paramPtrs = &ClientMockCreateRoleParamPtrs{} } mmCreateRole.defaultExpectation.paramPtrs.role = &role - mmCreateRole.defaultExpectation.expectationOrigins.originRole = minimock.CallerInfo(1) return mmCreateRole } @@ -2559,7 +2380,6 @@ func (mmCreateRole *mClientMockCreateRole) Return(rp1 *Role, err error) *ClientM mmCreateRole.defaultExpectation = &ClientMockCreateRoleExpectation{mock: mmCreateRole.mock} } mmCreateRole.defaultExpectation.results = &ClientMockCreateRoleResults{rp1, err} - mmCreateRole.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmCreateRole.mock } @@ -2574,7 +2394,6 @@ func (mmCreateRole *mClientMockCreateRole) Set(f func(ctx context.Context, servi } mmCreateRole.mock.funcCreateRole = f - mmCreateRole.mock.funcCreateRoleOrigin = minimock.CallerInfo(1) return mmCreateRole.mock } @@ -2586,9 +2405,8 @@ func (mmCreateRole *mClientMockCreateRole) When(ctx context.Context, serviceId s } expectation := &ClientMockCreateRoleExpectation{ - mock: mmCreateRole.mock, - params: &ClientMockCreateRoleParams{ctx, serviceId, role}, - expectationOrigins: ClientMockCreateRoleExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmCreateRole.mock, + params: &ClientMockCreateRoleParams{ctx, serviceId, role}, } mmCreateRole.expectations = append(mmCreateRole.expectations, expectation) return expectation @@ -2606,7 +2424,6 @@ func (mmCreateRole *mClientMockCreateRole) Times(n uint64) *mClientMockCreateRol mmCreateRole.mock.t.Fatalf("Times of ClientMock.CreateRole mock can not be zero") } mm_atomic.StoreUint64(&mmCreateRole.expectedInvocations, n) - mmCreateRole.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmCreateRole } @@ -2626,8 +2443,6 @@ func (mmCreateRole *ClientMock) CreateRole(ctx context.Context, serviceId string mm_atomic.AddUint64(&mmCreateRole.beforeCreateRoleCounter, 1) defer mm_atomic.AddUint64(&mmCreateRole.afterCreateRoleCounter, 1) - mmCreateRole.t.Helper() - if mmCreateRole.inspectFuncCreateRole != nil { mmCreateRole.inspectFuncCreateRole(ctx, serviceId, role) } @@ -2656,23 +2471,19 @@ func (mmCreateRole *ClientMock) CreateRole(ctx context.Context, serviceId string if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmCreateRole.t.Errorf("ClientMock.CreateRole got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateRole.CreateRoleMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmCreateRole.t.Errorf("ClientMock.CreateRole got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmCreateRole.t.Errorf("ClientMock.CreateRole got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateRole.CreateRoleMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmCreateRole.t.Errorf("ClientMock.CreateRole got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.role != nil && !minimock.Equal(*mm_want_ptrs.role, mm_got.role) { - mmCreateRole.t.Errorf("ClientMock.CreateRole got unexpected parameter role, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateRole.CreateRoleMock.defaultExpectation.expectationOrigins.originRole, *mm_want_ptrs.role, mm_got.role, minimock.Diff(*mm_want_ptrs.role, mm_got.role)) + mmCreateRole.t.Errorf("ClientMock.CreateRole got unexpected parameter role, want: %#v, got: %#v%s\n", *mm_want_ptrs.role, mm_got.role, minimock.Diff(*mm_want_ptrs.role, mm_got.role)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmCreateRole.t.Errorf("ClientMock.CreateRole got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateRole.CreateRoleMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmCreateRole.t.Errorf("ClientMock.CreateRole got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmCreateRole.CreateRoleMock.defaultExpectation.results @@ -2732,7 +2543,7 @@ func (m *ClientMock) MinimockCreateRoleDone() bool { func (m *ClientMock) MinimockCreateRoleInspect() { for _, e := range m.CreateRoleMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.CreateRole at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.CreateRole with params: %#v", *e.params) } } @@ -2740,19 +2551,19 @@ func (m *ClientMock) MinimockCreateRoleInspect() { // if default expectation was set then invocations count should be greater than zero if m.CreateRoleMock.defaultExpectation != nil && afterCreateRoleCounter < 1 { if m.CreateRoleMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.CreateRole at\n%s", m.CreateRoleMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.CreateRole") } else { - m.t.Errorf("Expected call to ClientMock.CreateRole at\n%s with params: %#v", m.CreateRoleMock.defaultExpectation.expectationOrigins.origin, *m.CreateRoleMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.CreateRole with params: %#v", *m.CreateRoleMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcCreateRole != nil && afterCreateRoleCounter < 1 { - m.t.Errorf("Expected call to ClientMock.CreateRole at\n%s", m.funcCreateRoleOrigin) + m.t.Error("Expected call to ClientMock.CreateRole") } if !m.CreateRoleMock.invocationsDone() && afterCreateRoleCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.CreateRole at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.CreateRoleMock.expectedInvocations), m.CreateRoleMock.expectedInvocationsOrigin, afterCreateRoleCounter) + m.t.Errorf("Expected %d calls to ClientMock.CreateRole but found %d calls", + mm_atomic.LoadUint64(&m.CreateRoleMock.expectedInvocations), afterCreateRoleCounter) } } @@ -2765,19 +2576,16 @@ type mClientMockCreateService struct { callArgs []*ClientMockCreateServiceParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockCreateServiceExpectation specifies expectation struct of the Client.CreateService type ClientMockCreateServiceExpectation struct { - mock *ClientMock - params *ClientMockCreateServiceParams - paramPtrs *ClientMockCreateServiceParamPtrs - expectationOrigins ClientMockCreateServiceExpectationOrigins - results *ClientMockCreateServiceResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockCreateServiceParams + paramPtrs *ClientMockCreateServiceParamPtrs + results *ClientMockCreateServiceResults + Counter uint64 } // ClientMockCreateServiceParams contains parameters of the Client.CreateService @@ -2799,13 +2607,6 @@ type ClientMockCreateServiceResults struct { err error } -// ClientMockCreateServiceOrigins contains origins of expectations of the Client.CreateService -type ClientMockCreateServiceExpectationOrigins struct { - origin string - originCtx string - originS string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -2831,7 +2632,6 @@ func (mmCreateService *mClientMockCreateService) Expect(ctx context.Context, s S } mmCreateService.defaultExpectation.params = &ClientMockCreateServiceParams{ctx, s} - mmCreateService.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmCreateService.expectations { if minimock.Equal(e.params, mmCreateService.defaultExpectation.params) { mmCreateService.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmCreateService.defaultExpectation.params) @@ -2859,7 +2659,6 @@ func (mmCreateService *mClientMockCreateService) ExpectCtxParam1(ctx context.Con mmCreateService.defaultExpectation.paramPtrs = &ClientMockCreateServiceParamPtrs{} } mmCreateService.defaultExpectation.paramPtrs.ctx = &ctx - mmCreateService.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmCreateService } @@ -2882,7 +2681,6 @@ func (mmCreateService *mClientMockCreateService) ExpectSParam2(s Service) *mClie mmCreateService.defaultExpectation.paramPtrs = &ClientMockCreateServiceParamPtrs{} } mmCreateService.defaultExpectation.paramPtrs.s = &s - mmCreateService.defaultExpectation.expectationOrigins.originS = minimock.CallerInfo(1) return mmCreateService } @@ -2908,7 +2706,6 @@ func (mmCreateService *mClientMockCreateService) Return(sp1 *Service, s1 string, mmCreateService.defaultExpectation = &ClientMockCreateServiceExpectation{mock: mmCreateService.mock} } mmCreateService.defaultExpectation.results = &ClientMockCreateServiceResults{sp1, s1, err} - mmCreateService.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmCreateService.mock } @@ -2923,7 +2720,6 @@ func (mmCreateService *mClientMockCreateService) Set(f func(ctx context.Context, } mmCreateService.mock.funcCreateService = f - mmCreateService.mock.funcCreateServiceOrigin = minimock.CallerInfo(1) return mmCreateService.mock } @@ -2935,9 +2731,8 @@ func (mmCreateService *mClientMockCreateService) When(ctx context.Context, s Ser } expectation := &ClientMockCreateServiceExpectation{ - mock: mmCreateService.mock, - params: &ClientMockCreateServiceParams{ctx, s}, - expectationOrigins: ClientMockCreateServiceExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmCreateService.mock, + params: &ClientMockCreateServiceParams{ctx, s}, } mmCreateService.expectations = append(mmCreateService.expectations, expectation) return expectation @@ -2955,7 +2750,6 @@ func (mmCreateService *mClientMockCreateService) Times(n uint64) *mClientMockCre mmCreateService.mock.t.Fatalf("Times of ClientMock.CreateService mock can not be zero") } mm_atomic.StoreUint64(&mmCreateService.expectedInvocations, n) - mmCreateService.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmCreateService } @@ -2975,8 +2769,6 @@ func (mmCreateService *ClientMock) CreateService(ctx context.Context, s Service) mm_atomic.AddUint64(&mmCreateService.beforeCreateServiceCounter, 1) defer mm_atomic.AddUint64(&mmCreateService.afterCreateServiceCounter, 1) - mmCreateService.t.Helper() - if mmCreateService.inspectFuncCreateService != nil { mmCreateService.inspectFuncCreateService(ctx, s) } @@ -3005,18 +2797,15 @@ func (mmCreateService *ClientMock) CreateService(ctx context.Context, s Service) if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmCreateService.t.Errorf("ClientMock.CreateService got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateService.CreateServiceMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmCreateService.t.Errorf("ClientMock.CreateService got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.s != nil && !minimock.Equal(*mm_want_ptrs.s, mm_got.s) { - mmCreateService.t.Errorf("ClientMock.CreateService got unexpected parameter s, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateService.CreateServiceMock.defaultExpectation.expectationOrigins.originS, *mm_want_ptrs.s, mm_got.s, minimock.Diff(*mm_want_ptrs.s, mm_got.s)) + mmCreateService.t.Errorf("ClientMock.CreateService got unexpected parameter s, want: %#v, got: %#v%s\n", *mm_want_ptrs.s, mm_got.s, minimock.Diff(*mm_want_ptrs.s, mm_got.s)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmCreateService.t.Errorf("ClientMock.CreateService got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateService.CreateServiceMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmCreateService.t.Errorf("ClientMock.CreateService got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmCreateService.CreateServiceMock.defaultExpectation.results @@ -3076,7 +2865,7 @@ func (m *ClientMock) MinimockCreateServiceDone() bool { func (m *ClientMock) MinimockCreateServiceInspect() { for _, e := range m.CreateServiceMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.CreateService at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.CreateService with params: %#v", *e.params) } } @@ -3084,19 +2873,19 @@ func (m *ClientMock) MinimockCreateServiceInspect() { // if default expectation was set then invocations count should be greater than zero if m.CreateServiceMock.defaultExpectation != nil && afterCreateServiceCounter < 1 { if m.CreateServiceMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.CreateService at\n%s", m.CreateServiceMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.CreateService") } else { - m.t.Errorf("Expected call to ClientMock.CreateService at\n%s with params: %#v", m.CreateServiceMock.defaultExpectation.expectationOrigins.origin, *m.CreateServiceMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.CreateService with params: %#v", *m.CreateServiceMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcCreateService != nil && afterCreateServiceCounter < 1 { - m.t.Errorf("Expected call to ClientMock.CreateService at\n%s", m.funcCreateServiceOrigin) + m.t.Error("Expected call to ClientMock.CreateService") } if !m.CreateServiceMock.invocationsDone() && afterCreateServiceCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.CreateService at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.CreateServiceMock.expectedInvocations), m.CreateServiceMock.expectedInvocationsOrigin, afterCreateServiceCounter) + m.t.Errorf("Expected %d calls to ClientMock.CreateService but found %d calls", + mm_atomic.LoadUint64(&m.CreateServiceMock.expectedInvocations), afterCreateServiceCounter) } } @@ -3109,19 +2898,16 @@ type mClientMockCreateUser struct { callArgs []*ClientMockCreateUserParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockCreateUserExpectation specifies expectation struct of the Client.CreateUser type ClientMockCreateUserExpectation struct { - mock *ClientMock - params *ClientMockCreateUserParams - paramPtrs *ClientMockCreateUserParamPtrs - expectationOrigins ClientMockCreateUserExpectationOrigins - results *ClientMockCreateUserResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockCreateUserParams + paramPtrs *ClientMockCreateUserParamPtrs + results *ClientMockCreateUserResults + Counter uint64 } // ClientMockCreateUserParams contains parameters of the Client.CreateUser @@ -3144,14 +2930,6 @@ type ClientMockCreateUserResults struct { err error } -// ClientMockCreateUserOrigins contains origins of expectations of the Client.CreateUser -type ClientMockCreateUserExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originUser string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -3177,7 +2955,6 @@ func (mmCreateUser *mClientMockCreateUser) Expect(ctx context.Context, serviceId } mmCreateUser.defaultExpectation.params = &ClientMockCreateUserParams{ctx, serviceId, user} - mmCreateUser.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmCreateUser.expectations { if minimock.Equal(e.params, mmCreateUser.defaultExpectation.params) { mmCreateUser.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmCreateUser.defaultExpectation.params) @@ -3205,7 +2982,6 @@ func (mmCreateUser *mClientMockCreateUser) ExpectCtxParam1(ctx context.Context) mmCreateUser.defaultExpectation.paramPtrs = &ClientMockCreateUserParamPtrs{} } mmCreateUser.defaultExpectation.paramPtrs.ctx = &ctx - mmCreateUser.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmCreateUser } @@ -3228,7 +3004,6 @@ func (mmCreateUser *mClientMockCreateUser) ExpectServiceIdParam2(serviceId strin mmCreateUser.defaultExpectation.paramPtrs = &ClientMockCreateUserParamPtrs{} } mmCreateUser.defaultExpectation.paramPtrs.serviceId = &serviceId - mmCreateUser.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmCreateUser } @@ -3251,7 +3026,6 @@ func (mmCreateUser *mClientMockCreateUser) ExpectUserParam3(user User) *mClientM mmCreateUser.defaultExpectation.paramPtrs = &ClientMockCreateUserParamPtrs{} } mmCreateUser.defaultExpectation.paramPtrs.user = &user - mmCreateUser.defaultExpectation.expectationOrigins.originUser = minimock.CallerInfo(1) return mmCreateUser } @@ -3277,7 +3051,6 @@ func (mmCreateUser *mClientMockCreateUser) Return(up1 *User, err error) *ClientM mmCreateUser.defaultExpectation = &ClientMockCreateUserExpectation{mock: mmCreateUser.mock} } mmCreateUser.defaultExpectation.results = &ClientMockCreateUserResults{up1, err} - mmCreateUser.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmCreateUser.mock } @@ -3292,7 +3065,6 @@ func (mmCreateUser *mClientMockCreateUser) Set(f func(ctx context.Context, servi } mmCreateUser.mock.funcCreateUser = f - mmCreateUser.mock.funcCreateUserOrigin = minimock.CallerInfo(1) return mmCreateUser.mock } @@ -3304,9 +3076,8 @@ func (mmCreateUser *mClientMockCreateUser) When(ctx context.Context, serviceId s } expectation := &ClientMockCreateUserExpectation{ - mock: mmCreateUser.mock, - params: &ClientMockCreateUserParams{ctx, serviceId, user}, - expectationOrigins: ClientMockCreateUserExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmCreateUser.mock, + params: &ClientMockCreateUserParams{ctx, serviceId, user}, } mmCreateUser.expectations = append(mmCreateUser.expectations, expectation) return expectation @@ -3324,7 +3095,6 @@ func (mmCreateUser *mClientMockCreateUser) Times(n uint64) *mClientMockCreateUse mmCreateUser.mock.t.Fatalf("Times of ClientMock.CreateUser mock can not be zero") } mm_atomic.StoreUint64(&mmCreateUser.expectedInvocations, n) - mmCreateUser.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmCreateUser } @@ -3344,8 +3114,6 @@ func (mmCreateUser *ClientMock) CreateUser(ctx context.Context, serviceId string mm_atomic.AddUint64(&mmCreateUser.beforeCreateUserCounter, 1) defer mm_atomic.AddUint64(&mmCreateUser.afterCreateUserCounter, 1) - mmCreateUser.t.Helper() - if mmCreateUser.inspectFuncCreateUser != nil { mmCreateUser.inspectFuncCreateUser(ctx, serviceId, user) } @@ -3374,23 +3142,19 @@ func (mmCreateUser *ClientMock) CreateUser(ctx context.Context, serviceId string if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmCreateUser.t.Errorf("ClientMock.CreateUser got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateUser.CreateUserMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmCreateUser.t.Errorf("ClientMock.CreateUser got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmCreateUser.t.Errorf("ClientMock.CreateUser got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateUser.CreateUserMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmCreateUser.t.Errorf("ClientMock.CreateUser got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.user != nil && !minimock.Equal(*mm_want_ptrs.user, mm_got.user) { - mmCreateUser.t.Errorf("ClientMock.CreateUser got unexpected parameter user, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateUser.CreateUserMock.defaultExpectation.expectationOrigins.originUser, *mm_want_ptrs.user, mm_got.user, minimock.Diff(*mm_want_ptrs.user, mm_got.user)) + mmCreateUser.t.Errorf("ClientMock.CreateUser got unexpected parameter user, want: %#v, got: %#v%s\n", *mm_want_ptrs.user, mm_got.user, minimock.Diff(*mm_want_ptrs.user, mm_got.user)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmCreateUser.t.Errorf("ClientMock.CreateUser got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmCreateUser.CreateUserMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmCreateUser.t.Errorf("ClientMock.CreateUser got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmCreateUser.CreateUserMock.defaultExpectation.results @@ -3450,7 +3214,7 @@ func (m *ClientMock) MinimockCreateUserDone() bool { func (m *ClientMock) MinimockCreateUserInspect() { for _, e := range m.CreateUserMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.CreateUser at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.CreateUser with params: %#v", *e.params) } } @@ -3458,19 +3222,19 @@ func (m *ClientMock) MinimockCreateUserInspect() { // if default expectation was set then invocations count should be greater than zero if m.CreateUserMock.defaultExpectation != nil && afterCreateUserCounter < 1 { if m.CreateUserMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.CreateUser at\n%s", m.CreateUserMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.CreateUser") } else { - m.t.Errorf("Expected call to ClientMock.CreateUser at\n%s with params: %#v", m.CreateUserMock.defaultExpectation.expectationOrigins.origin, *m.CreateUserMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.CreateUser with params: %#v", *m.CreateUserMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcCreateUser != nil && afterCreateUserCounter < 1 { - m.t.Errorf("Expected call to ClientMock.CreateUser at\n%s", m.funcCreateUserOrigin) + m.t.Error("Expected call to ClientMock.CreateUser") } if !m.CreateUserMock.invocationsDone() && afterCreateUserCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.CreateUser at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.CreateUserMock.expectedInvocations), m.CreateUserMock.expectedInvocationsOrigin, afterCreateUserCounter) + m.t.Errorf("Expected %d calls to ClientMock.CreateUser but found %d calls", + mm_atomic.LoadUint64(&m.CreateUserMock.expectedInvocations), afterCreateUserCounter) } } @@ -3483,19 +3247,16 @@ type mClientMockDeleteClickPipe struct { callArgs []*ClientMockDeleteClickPipeParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockDeleteClickPipeExpectation specifies expectation struct of the Client.DeleteClickPipe type ClientMockDeleteClickPipeExpectation struct { - mock *ClientMock - params *ClientMockDeleteClickPipeParams - paramPtrs *ClientMockDeleteClickPipeParamPtrs - expectationOrigins ClientMockDeleteClickPipeExpectationOrigins - results *ClientMockDeleteClickPipeResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockDeleteClickPipeParams + paramPtrs *ClientMockDeleteClickPipeParamPtrs + results *ClientMockDeleteClickPipeResults + Counter uint64 } // ClientMockDeleteClickPipeParams contains parameters of the Client.DeleteClickPipe @@ -3517,14 +3278,6 @@ type ClientMockDeleteClickPipeResults struct { err error } -// ClientMockDeleteClickPipeOrigins contains origins of expectations of the Client.DeleteClickPipe -type ClientMockDeleteClickPipeExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originClickPipeId string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -3550,7 +3303,6 @@ func (mmDeleteClickPipe *mClientMockDeleteClickPipe) Expect(ctx context.Context, } mmDeleteClickPipe.defaultExpectation.params = &ClientMockDeleteClickPipeParams{ctx, serviceId, clickPipeId} - mmDeleteClickPipe.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmDeleteClickPipe.expectations { if minimock.Equal(e.params, mmDeleteClickPipe.defaultExpectation.params) { mmDeleteClickPipe.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmDeleteClickPipe.defaultExpectation.params) @@ -3578,7 +3330,6 @@ func (mmDeleteClickPipe *mClientMockDeleteClickPipe) ExpectCtxParam1(ctx context mmDeleteClickPipe.defaultExpectation.paramPtrs = &ClientMockDeleteClickPipeParamPtrs{} } mmDeleteClickPipe.defaultExpectation.paramPtrs.ctx = &ctx - mmDeleteClickPipe.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmDeleteClickPipe } @@ -3601,7 +3352,6 @@ func (mmDeleteClickPipe *mClientMockDeleteClickPipe) ExpectServiceIdParam2(servi mmDeleteClickPipe.defaultExpectation.paramPtrs = &ClientMockDeleteClickPipeParamPtrs{} } mmDeleteClickPipe.defaultExpectation.paramPtrs.serviceId = &serviceId - mmDeleteClickPipe.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmDeleteClickPipe } @@ -3624,7 +3374,6 @@ func (mmDeleteClickPipe *mClientMockDeleteClickPipe) ExpectClickPipeIdParam3(cli mmDeleteClickPipe.defaultExpectation.paramPtrs = &ClientMockDeleteClickPipeParamPtrs{} } mmDeleteClickPipe.defaultExpectation.paramPtrs.clickPipeId = &clickPipeId - mmDeleteClickPipe.defaultExpectation.expectationOrigins.originClickPipeId = minimock.CallerInfo(1) return mmDeleteClickPipe } @@ -3650,7 +3399,6 @@ func (mmDeleteClickPipe *mClientMockDeleteClickPipe) Return(err error) *ClientMo mmDeleteClickPipe.defaultExpectation = &ClientMockDeleteClickPipeExpectation{mock: mmDeleteClickPipe.mock} } mmDeleteClickPipe.defaultExpectation.results = &ClientMockDeleteClickPipeResults{err} - mmDeleteClickPipe.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmDeleteClickPipe.mock } @@ -3665,7 +3413,6 @@ func (mmDeleteClickPipe *mClientMockDeleteClickPipe) Set(f func(ctx context.Cont } mmDeleteClickPipe.mock.funcDeleteClickPipe = f - mmDeleteClickPipe.mock.funcDeleteClickPipeOrigin = minimock.CallerInfo(1) return mmDeleteClickPipe.mock } @@ -3677,9 +3424,8 @@ func (mmDeleteClickPipe *mClientMockDeleteClickPipe) When(ctx context.Context, s } expectation := &ClientMockDeleteClickPipeExpectation{ - mock: mmDeleteClickPipe.mock, - params: &ClientMockDeleteClickPipeParams{ctx, serviceId, clickPipeId}, - expectationOrigins: ClientMockDeleteClickPipeExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmDeleteClickPipe.mock, + params: &ClientMockDeleteClickPipeParams{ctx, serviceId, clickPipeId}, } mmDeleteClickPipe.expectations = append(mmDeleteClickPipe.expectations, expectation) return expectation @@ -3697,7 +3443,6 @@ func (mmDeleteClickPipe *mClientMockDeleteClickPipe) Times(n uint64) *mClientMoc mmDeleteClickPipe.mock.t.Fatalf("Times of ClientMock.DeleteClickPipe mock can not be zero") } mm_atomic.StoreUint64(&mmDeleteClickPipe.expectedInvocations, n) - mmDeleteClickPipe.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmDeleteClickPipe } @@ -3717,8 +3462,6 @@ func (mmDeleteClickPipe *ClientMock) DeleteClickPipe(ctx context.Context, servic mm_atomic.AddUint64(&mmDeleteClickPipe.beforeDeleteClickPipeCounter, 1) defer mm_atomic.AddUint64(&mmDeleteClickPipe.afterDeleteClickPipeCounter, 1) - mmDeleteClickPipe.t.Helper() - if mmDeleteClickPipe.inspectFuncDeleteClickPipe != nil { mmDeleteClickPipe.inspectFuncDeleteClickPipe(ctx, serviceId, clickPipeId) } @@ -3747,23 +3490,19 @@ func (mmDeleteClickPipe *ClientMock) DeleteClickPipe(ctx context.Context, servic if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmDeleteClickPipe.t.Errorf("ClientMock.DeleteClickPipe got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteClickPipe.DeleteClickPipeMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmDeleteClickPipe.t.Errorf("ClientMock.DeleteClickPipe got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmDeleteClickPipe.t.Errorf("ClientMock.DeleteClickPipe got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteClickPipe.DeleteClickPipeMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmDeleteClickPipe.t.Errorf("ClientMock.DeleteClickPipe got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.clickPipeId != nil && !minimock.Equal(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId) { - mmDeleteClickPipe.t.Errorf("ClientMock.DeleteClickPipe got unexpected parameter clickPipeId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteClickPipe.DeleteClickPipeMock.defaultExpectation.expectationOrigins.originClickPipeId, *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) + mmDeleteClickPipe.t.Errorf("ClientMock.DeleteClickPipe got unexpected parameter clickPipeId, want: %#v, got: %#v%s\n", *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmDeleteClickPipe.t.Errorf("ClientMock.DeleteClickPipe got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteClickPipe.DeleteClickPipeMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmDeleteClickPipe.t.Errorf("ClientMock.DeleteClickPipe got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmDeleteClickPipe.DeleteClickPipeMock.defaultExpectation.results @@ -3823,7 +3562,7 @@ func (m *ClientMock) MinimockDeleteClickPipeDone() bool { func (m *ClientMock) MinimockDeleteClickPipeInspect() { for _, e := range m.DeleteClickPipeMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteClickPipe at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.DeleteClickPipe with params: %#v", *e.params) } } @@ -3831,19 +3570,19 @@ func (m *ClientMock) MinimockDeleteClickPipeInspect() { // if default expectation was set then invocations count should be greater than zero if m.DeleteClickPipeMock.defaultExpectation != nil && afterDeleteClickPipeCounter < 1 { if m.DeleteClickPipeMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.DeleteClickPipe at\n%s", m.DeleteClickPipeMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.DeleteClickPipe") } else { - m.t.Errorf("Expected call to ClientMock.DeleteClickPipe at\n%s with params: %#v", m.DeleteClickPipeMock.defaultExpectation.expectationOrigins.origin, *m.DeleteClickPipeMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.DeleteClickPipe with params: %#v", *m.DeleteClickPipeMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcDeleteClickPipe != nil && afterDeleteClickPipeCounter < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteClickPipe at\n%s", m.funcDeleteClickPipeOrigin) + m.t.Error("Expected call to ClientMock.DeleteClickPipe") } if !m.DeleteClickPipeMock.invocationsDone() && afterDeleteClickPipeCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.DeleteClickPipe at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.DeleteClickPipeMock.expectedInvocations), m.DeleteClickPipeMock.expectedInvocationsOrigin, afterDeleteClickPipeCounter) + m.t.Errorf("Expected %d calls to ClientMock.DeleteClickPipe but found %d calls", + mm_atomic.LoadUint64(&m.DeleteClickPipeMock.expectedInvocations), afterDeleteClickPipeCounter) } } @@ -3856,19 +3595,16 @@ type mClientMockDeleteDatabase struct { callArgs []*ClientMockDeleteDatabaseParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockDeleteDatabaseExpectation specifies expectation struct of the Client.DeleteDatabase type ClientMockDeleteDatabaseExpectation struct { - mock *ClientMock - params *ClientMockDeleteDatabaseParams - paramPtrs *ClientMockDeleteDatabaseParamPtrs - expectationOrigins ClientMockDeleteDatabaseExpectationOrigins - results *ClientMockDeleteDatabaseResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockDeleteDatabaseParams + paramPtrs *ClientMockDeleteDatabaseParamPtrs + results *ClientMockDeleteDatabaseResults + Counter uint64 } // ClientMockDeleteDatabaseParams contains parameters of the Client.DeleteDatabase @@ -3890,14 +3626,6 @@ type ClientMockDeleteDatabaseResults struct { err error } -// ClientMockDeleteDatabaseOrigins contains origins of expectations of the Client.DeleteDatabase -type ClientMockDeleteDatabaseExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originName string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -3923,7 +3651,6 @@ func (mmDeleteDatabase *mClientMockDeleteDatabase) Expect(ctx context.Context, s } mmDeleteDatabase.defaultExpectation.params = &ClientMockDeleteDatabaseParams{ctx, serviceID, name} - mmDeleteDatabase.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmDeleteDatabase.expectations { if minimock.Equal(e.params, mmDeleteDatabase.defaultExpectation.params) { mmDeleteDatabase.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmDeleteDatabase.defaultExpectation.params) @@ -3951,7 +3678,6 @@ func (mmDeleteDatabase *mClientMockDeleteDatabase) ExpectCtxParam1(ctx context.C mmDeleteDatabase.defaultExpectation.paramPtrs = &ClientMockDeleteDatabaseParamPtrs{} } mmDeleteDatabase.defaultExpectation.paramPtrs.ctx = &ctx - mmDeleteDatabase.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmDeleteDatabase } @@ -3974,7 +3700,6 @@ func (mmDeleteDatabase *mClientMockDeleteDatabase) ExpectServiceIDParam2(service mmDeleteDatabase.defaultExpectation.paramPtrs = &ClientMockDeleteDatabaseParamPtrs{} } mmDeleteDatabase.defaultExpectation.paramPtrs.serviceID = &serviceID - mmDeleteDatabase.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmDeleteDatabase } @@ -3997,7 +3722,6 @@ func (mmDeleteDatabase *mClientMockDeleteDatabase) ExpectNameParam3(name string) mmDeleteDatabase.defaultExpectation.paramPtrs = &ClientMockDeleteDatabaseParamPtrs{} } mmDeleteDatabase.defaultExpectation.paramPtrs.name = &name - mmDeleteDatabase.defaultExpectation.expectationOrigins.originName = minimock.CallerInfo(1) return mmDeleteDatabase } @@ -4023,7 +3747,6 @@ func (mmDeleteDatabase *mClientMockDeleteDatabase) Return(err error) *ClientMock mmDeleteDatabase.defaultExpectation = &ClientMockDeleteDatabaseExpectation{mock: mmDeleteDatabase.mock} } mmDeleteDatabase.defaultExpectation.results = &ClientMockDeleteDatabaseResults{err} - mmDeleteDatabase.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmDeleteDatabase.mock } @@ -4038,7 +3761,6 @@ func (mmDeleteDatabase *mClientMockDeleteDatabase) Set(f func(ctx context.Contex } mmDeleteDatabase.mock.funcDeleteDatabase = f - mmDeleteDatabase.mock.funcDeleteDatabaseOrigin = minimock.CallerInfo(1) return mmDeleteDatabase.mock } @@ -4050,9 +3772,8 @@ func (mmDeleteDatabase *mClientMockDeleteDatabase) When(ctx context.Context, ser } expectation := &ClientMockDeleteDatabaseExpectation{ - mock: mmDeleteDatabase.mock, - params: &ClientMockDeleteDatabaseParams{ctx, serviceID, name}, - expectationOrigins: ClientMockDeleteDatabaseExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmDeleteDatabase.mock, + params: &ClientMockDeleteDatabaseParams{ctx, serviceID, name}, } mmDeleteDatabase.expectations = append(mmDeleteDatabase.expectations, expectation) return expectation @@ -4070,7 +3791,6 @@ func (mmDeleteDatabase *mClientMockDeleteDatabase) Times(n uint64) *mClientMockD mmDeleteDatabase.mock.t.Fatalf("Times of ClientMock.DeleteDatabase mock can not be zero") } mm_atomic.StoreUint64(&mmDeleteDatabase.expectedInvocations, n) - mmDeleteDatabase.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmDeleteDatabase } @@ -4090,8 +3810,6 @@ func (mmDeleteDatabase *ClientMock) DeleteDatabase(ctx context.Context, serviceI mm_atomic.AddUint64(&mmDeleteDatabase.beforeDeleteDatabaseCounter, 1) defer mm_atomic.AddUint64(&mmDeleteDatabase.afterDeleteDatabaseCounter, 1) - mmDeleteDatabase.t.Helper() - if mmDeleteDatabase.inspectFuncDeleteDatabase != nil { mmDeleteDatabase.inspectFuncDeleteDatabase(ctx, serviceID, name) } @@ -4120,23 +3838,19 @@ func (mmDeleteDatabase *ClientMock) DeleteDatabase(ctx context.Context, serviceI if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmDeleteDatabase.t.Errorf("ClientMock.DeleteDatabase got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteDatabase.DeleteDatabaseMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmDeleteDatabase.t.Errorf("ClientMock.DeleteDatabase got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmDeleteDatabase.t.Errorf("ClientMock.DeleteDatabase got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteDatabase.DeleteDatabaseMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmDeleteDatabase.t.Errorf("ClientMock.DeleteDatabase got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.name != nil && !minimock.Equal(*mm_want_ptrs.name, mm_got.name) { - mmDeleteDatabase.t.Errorf("ClientMock.DeleteDatabase got unexpected parameter name, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteDatabase.DeleteDatabaseMock.defaultExpectation.expectationOrigins.originName, *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) + mmDeleteDatabase.t.Errorf("ClientMock.DeleteDatabase got unexpected parameter name, want: %#v, got: %#v%s\n", *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmDeleteDatabase.t.Errorf("ClientMock.DeleteDatabase got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteDatabase.DeleteDatabaseMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmDeleteDatabase.t.Errorf("ClientMock.DeleteDatabase got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmDeleteDatabase.DeleteDatabaseMock.defaultExpectation.results @@ -4196,7 +3910,7 @@ func (m *ClientMock) MinimockDeleteDatabaseDone() bool { func (m *ClientMock) MinimockDeleteDatabaseInspect() { for _, e := range m.DeleteDatabaseMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteDatabase at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.DeleteDatabase with params: %#v", *e.params) } } @@ -4204,19 +3918,19 @@ func (m *ClientMock) MinimockDeleteDatabaseInspect() { // if default expectation was set then invocations count should be greater than zero if m.DeleteDatabaseMock.defaultExpectation != nil && afterDeleteDatabaseCounter < 1 { if m.DeleteDatabaseMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.DeleteDatabase at\n%s", m.DeleteDatabaseMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.DeleteDatabase") } else { - m.t.Errorf("Expected call to ClientMock.DeleteDatabase at\n%s with params: %#v", m.DeleteDatabaseMock.defaultExpectation.expectationOrigins.origin, *m.DeleteDatabaseMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.DeleteDatabase with params: %#v", *m.DeleteDatabaseMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcDeleteDatabase != nil && afterDeleteDatabaseCounter < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteDatabase at\n%s", m.funcDeleteDatabaseOrigin) + m.t.Error("Expected call to ClientMock.DeleteDatabase") } if !m.DeleteDatabaseMock.invocationsDone() && afterDeleteDatabaseCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.DeleteDatabase at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.DeleteDatabaseMock.expectedInvocations), m.DeleteDatabaseMock.expectedInvocationsOrigin, afterDeleteDatabaseCounter) + m.t.Errorf("Expected %d calls to ClientMock.DeleteDatabase but found %d calls", + mm_atomic.LoadUint64(&m.DeleteDatabaseMock.expectedInvocations), afterDeleteDatabaseCounter) } } @@ -4229,19 +3943,16 @@ type mClientMockDeleteQueryEndpoint struct { callArgs []*ClientMockDeleteQueryEndpointParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockDeleteQueryEndpointExpectation specifies expectation struct of the Client.DeleteQueryEndpoint type ClientMockDeleteQueryEndpointExpectation struct { - mock *ClientMock - params *ClientMockDeleteQueryEndpointParams - paramPtrs *ClientMockDeleteQueryEndpointParamPtrs - expectationOrigins ClientMockDeleteQueryEndpointExpectationOrigins - results *ClientMockDeleteQueryEndpointResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockDeleteQueryEndpointParams + paramPtrs *ClientMockDeleteQueryEndpointParamPtrs + results *ClientMockDeleteQueryEndpointResults + Counter uint64 } // ClientMockDeleteQueryEndpointParams contains parameters of the Client.DeleteQueryEndpoint @@ -4261,13 +3972,6 @@ type ClientMockDeleteQueryEndpointResults struct { err error } -// ClientMockDeleteQueryEndpointOrigins contains origins of expectations of the Client.DeleteQueryEndpoint -type ClientMockDeleteQueryEndpointExpectationOrigins struct { - origin string - originCtx string - originServiceID string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -4293,7 +3997,6 @@ func (mmDeleteQueryEndpoint *mClientMockDeleteQueryEndpoint) Expect(ctx context. } mmDeleteQueryEndpoint.defaultExpectation.params = &ClientMockDeleteQueryEndpointParams{ctx, serviceID} - mmDeleteQueryEndpoint.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmDeleteQueryEndpoint.expectations { if minimock.Equal(e.params, mmDeleteQueryEndpoint.defaultExpectation.params) { mmDeleteQueryEndpoint.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmDeleteQueryEndpoint.defaultExpectation.params) @@ -4321,7 +4024,6 @@ func (mmDeleteQueryEndpoint *mClientMockDeleteQueryEndpoint) ExpectCtxParam1(ctx mmDeleteQueryEndpoint.defaultExpectation.paramPtrs = &ClientMockDeleteQueryEndpointParamPtrs{} } mmDeleteQueryEndpoint.defaultExpectation.paramPtrs.ctx = &ctx - mmDeleteQueryEndpoint.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmDeleteQueryEndpoint } @@ -4344,7 +4046,6 @@ func (mmDeleteQueryEndpoint *mClientMockDeleteQueryEndpoint) ExpectServiceIDPara mmDeleteQueryEndpoint.defaultExpectation.paramPtrs = &ClientMockDeleteQueryEndpointParamPtrs{} } mmDeleteQueryEndpoint.defaultExpectation.paramPtrs.serviceID = &serviceID - mmDeleteQueryEndpoint.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmDeleteQueryEndpoint } @@ -4370,7 +4071,6 @@ func (mmDeleteQueryEndpoint *mClientMockDeleteQueryEndpoint) Return(err error) * mmDeleteQueryEndpoint.defaultExpectation = &ClientMockDeleteQueryEndpointExpectation{mock: mmDeleteQueryEndpoint.mock} } mmDeleteQueryEndpoint.defaultExpectation.results = &ClientMockDeleteQueryEndpointResults{err} - mmDeleteQueryEndpoint.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmDeleteQueryEndpoint.mock } @@ -4385,7 +4085,6 @@ func (mmDeleteQueryEndpoint *mClientMockDeleteQueryEndpoint) Set(f func(ctx cont } mmDeleteQueryEndpoint.mock.funcDeleteQueryEndpoint = f - mmDeleteQueryEndpoint.mock.funcDeleteQueryEndpointOrigin = minimock.CallerInfo(1) return mmDeleteQueryEndpoint.mock } @@ -4397,9 +4096,8 @@ func (mmDeleteQueryEndpoint *mClientMockDeleteQueryEndpoint) When(ctx context.Co } expectation := &ClientMockDeleteQueryEndpointExpectation{ - mock: mmDeleteQueryEndpoint.mock, - params: &ClientMockDeleteQueryEndpointParams{ctx, serviceID}, - expectationOrigins: ClientMockDeleteQueryEndpointExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmDeleteQueryEndpoint.mock, + params: &ClientMockDeleteQueryEndpointParams{ctx, serviceID}, } mmDeleteQueryEndpoint.expectations = append(mmDeleteQueryEndpoint.expectations, expectation) return expectation @@ -4417,7 +4115,6 @@ func (mmDeleteQueryEndpoint *mClientMockDeleteQueryEndpoint) Times(n uint64) *mC mmDeleteQueryEndpoint.mock.t.Fatalf("Times of ClientMock.DeleteQueryEndpoint mock can not be zero") } mm_atomic.StoreUint64(&mmDeleteQueryEndpoint.expectedInvocations, n) - mmDeleteQueryEndpoint.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmDeleteQueryEndpoint } @@ -4437,8 +4134,6 @@ func (mmDeleteQueryEndpoint *ClientMock) DeleteQueryEndpoint(ctx context.Context mm_atomic.AddUint64(&mmDeleteQueryEndpoint.beforeDeleteQueryEndpointCounter, 1) defer mm_atomic.AddUint64(&mmDeleteQueryEndpoint.afterDeleteQueryEndpointCounter, 1) - mmDeleteQueryEndpoint.t.Helper() - if mmDeleteQueryEndpoint.inspectFuncDeleteQueryEndpoint != nil { mmDeleteQueryEndpoint.inspectFuncDeleteQueryEndpoint(ctx, serviceID) } @@ -4467,18 +4162,15 @@ func (mmDeleteQueryEndpoint *ClientMock) DeleteQueryEndpoint(ctx context.Context if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmDeleteQueryEndpoint.t.Errorf("ClientMock.DeleteQueryEndpoint got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteQueryEndpoint.DeleteQueryEndpointMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmDeleteQueryEndpoint.t.Errorf("ClientMock.DeleteQueryEndpoint got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmDeleteQueryEndpoint.t.Errorf("ClientMock.DeleteQueryEndpoint got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteQueryEndpoint.DeleteQueryEndpointMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmDeleteQueryEndpoint.t.Errorf("ClientMock.DeleteQueryEndpoint got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmDeleteQueryEndpoint.t.Errorf("ClientMock.DeleteQueryEndpoint got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteQueryEndpoint.DeleteQueryEndpointMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmDeleteQueryEndpoint.t.Errorf("ClientMock.DeleteQueryEndpoint got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmDeleteQueryEndpoint.DeleteQueryEndpointMock.defaultExpectation.results @@ -4538,7 +4230,7 @@ func (m *ClientMock) MinimockDeleteQueryEndpointDone() bool { func (m *ClientMock) MinimockDeleteQueryEndpointInspect() { for _, e := range m.DeleteQueryEndpointMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteQueryEndpoint at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.DeleteQueryEndpoint with params: %#v", *e.params) } } @@ -4546,19 +4238,19 @@ func (m *ClientMock) MinimockDeleteQueryEndpointInspect() { // if default expectation was set then invocations count should be greater than zero if m.DeleteQueryEndpointMock.defaultExpectation != nil && afterDeleteQueryEndpointCounter < 1 { if m.DeleteQueryEndpointMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.DeleteQueryEndpoint at\n%s", m.DeleteQueryEndpointMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.DeleteQueryEndpoint") } else { - m.t.Errorf("Expected call to ClientMock.DeleteQueryEndpoint at\n%s with params: %#v", m.DeleteQueryEndpointMock.defaultExpectation.expectationOrigins.origin, *m.DeleteQueryEndpointMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.DeleteQueryEndpoint with params: %#v", *m.DeleteQueryEndpointMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcDeleteQueryEndpoint != nil && afterDeleteQueryEndpointCounter < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteQueryEndpoint at\n%s", m.funcDeleteQueryEndpointOrigin) + m.t.Error("Expected call to ClientMock.DeleteQueryEndpoint") } if !m.DeleteQueryEndpointMock.invocationsDone() && afterDeleteQueryEndpointCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.DeleteQueryEndpoint at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.DeleteQueryEndpointMock.expectedInvocations), m.DeleteQueryEndpointMock.expectedInvocationsOrigin, afterDeleteQueryEndpointCounter) + m.t.Errorf("Expected %d calls to ClientMock.DeleteQueryEndpoint but found %d calls", + mm_atomic.LoadUint64(&m.DeleteQueryEndpointMock.expectedInvocations), afterDeleteQueryEndpointCounter) } } @@ -4571,19 +4263,16 @@ type mClientMockDeleteReversePrivateEndpoint struct { callArgs []*ClientMockDeleteReversePrivateEndpointParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockDeleteReversePrivateEndpointExpectation specifies expectation struct of the Client.DeleteReversePrivateEndpoint type ClientMockDeleteReversePrivateEndpointExpectation struct { - mock *ClientMock - params *ClientMockDeleteReversePrivateEndpointParams - paramPtrs *ClientMockDeleteReversePrivateEndpointParamPtrs - expectationOrigins ClientMockDeleteReversePrivateEndpointExpectationOrigins - results *ClientMockDeleteReversePrivateEndpointResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockDeleteReversePrivateEndpointParams + paramPtrs *ClientMockDeleteReversePrivateEndpointParamPtrs + results *ClientMockDeleteReversePrivateEndpointResults + Counter uint64 } // ClientMockDeleteReversePrivateEndpointParams contains parameters of the Client.DeleteReversePrivateEndpoint @@ -4605,14 +4294,6 @@ type ClientMockDeleteReversePrivateEndpointResults struct { err error } -// ClientMockDeleteReversePrivateEndpointOrigins contains origins of expectations of the Client.DeleteReversePrivateEndpoint -type ClientMockDeleteReversePrivateEndpointExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originReversePrivateEndpointId string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -4638,7 +4319,6 @@ func (mmDeleteReversePrivateEndpoint *mClientMockDeleteReversePrivateEndpoint) E } mmDeleteReversePrivateEndpoint.defaultExpectation.params = &ClientMockDeleteReversePrivateEndpointParams{ctx, serviceId, reversePrivateEndpointId} - mmDeleteReversePrivateEndpoint.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmDeleteReversePrivateEndpoint.expectations { if minimock.Equal(e.params, mmDeleteReversePrivateEndpoint.defaultExpectation.params) { mmDeleteReversePrivateEndpoint.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmDeleteReversePrivateEndpoint.defaultExpectation.params) @@ -4666,7 +4346,6 @@ func (mmDeleteReversePrivateEndpoint *mClientMockDeleteReversePrivateEndpoint) E mmDeleteReversePrivateEndpoint.defaultExpectation.paramPtrs = &ClientMockDeleteReversePrivateEndpointParamPtrs{} } mmDeleteReversePrivateEndpoint.defaultExpectation.paramPtrs.ctx = &ctx - mmDeleteReversePrivateEndpoint.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmDeleteReversePrivateEndpoint } @@ -4689,7 +4368,6 @@ func (mmDeleteReversePrivateEndpoint *mClientMockDeleteReversePrivateEndpoint) E mmDeleteReversePrivateEndpoint.defaultExpectation.paramPtrs = &ClientMockDeleteReversePrivateEndpointParamPtrs{} } mmDeleteReversePrivateEndpoint.defaultExpectation.paramPtrs.serviceId = &serviceId - mmDeleteReversePrivateEndpoint.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmDeleteReversePrivateEndpoint } @@ -4712,7 +4390,6 @@ func (mmDeleteReversePrivateEndpoint *mClientMockDeleteReversePrivateEndpoint) E mmDeleteReversePrivateEndpoint.defaultExpectation.paramPtrs = &ClientMockDeleteReversePrivateEndpointParamPtrs{} } mmDeleteReversePrivateEndpoint.defaultExpectation.paramPtrs.reversePrivateEndpointId = &reversePrivateEndpointId - mmDeleteReversePrivateEndpoint.defaultExpectation.expectationOrigins.originReversePrivateEndpointId = minimock.CallerInfo(1) return mmDeleteReversePrivateEndpoint } @@ -4738,7 +4415,6 @@ func (mmDeleteReversePrivateEndpoint *mClientMockDeleteReversePrivateEndpoint) R mmDeleteReversePrivateEndpoint.defaultExpectation = &ClientMockDeleteReversePrivateEndpointExpectation{mock: mmDeleteReversePrivateEndpoint.mock} } mmDeleteReversePrivateEndpoint.defaultExpectation.results = &ClientMockDeleteReversePrivateEndpointResults{err} - mmDeleteReversePrivateEndpoint.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmDeleteReversePrivateEndpoint.mock } @@ -4753,7 +4429,6 @@ func (mmDeleteReversePrivateEndpoint *mClientMockDeleteReversePrivateEndpoint) S } mmDeleteReversePrivateEndpoint.mock.funcDeleteReversePrivateEndpoint = f - mmDeleteReversePrivateEndpoint.mock.funcDeleteReversePrivateEndpointOrigin = minimock.CallerInfo(1) return mmDeleteReversePrivateEndpoint.mock } @@ -4765,9 +4440,8 @@ func (mmDeleteReversePrivateEndpoint *mClientMockDeleteReversePrivateEndpoint) W } expectation := &ClientMockDeleteReversePrivateEndpointExpectation{ - mock: mmDeleteReversePrivateEndpoint.mock, - params: &ClientMockDeleteReversePrivateEndpointParams{ctx, serviceId, reversePrivateEndpointId}, - expectationOrigins: ClientMockDeleteReversePrivateEndpointExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmDeleteReversePrivateEndpoint.mock, + params: &ClientMockDeleteReversePrivateEndpointParams{ctx, serviceId, reversePrivateEndpointId}, } mmDeleteReversePrivateEndpoint.expectations = append(mmDeleteReversePrivateEndpoint.expectations, expectation) return expectation @@ -4785,7 +4459,6 @@ func (mmDeleteReversePrivateEndpoint *mClientMockDeleteReversePrivateEndpoint) T mmDeleteReversePrivateEndpoint.mock.t.Fatalf("Times of ClientMock.DeleteReversePrivateEndpoint mock can not be zero") } mm_atomic.StoreUint64(&mmDeleteReversePrivateEndpoint.expectedInvocations, n) - mmDeleteReversePrivateEndpoint.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmDeleteReversePrivateEndpoint } @@ -4805,8 +4478,6 @@ func (mmDeleteReversePrivateEndpoint *ClientMock) DeleteReversePrivateEndpoint(c mm_atomic.AddUint64(&mmDeleteReversePrivateEndpoint.beforeDeleteReversePrivateEndpointCounter, 1) defer mm_atomic.AddUint64(&mmDeleteReversePrivateEndpoint.afterDeleteReversePrivateEndpointCounter, 1) - mmDeleteReversePrivateEndpoint.t.Helper() - if mmDeleteReversePrivateEndpoint.inspectFuncDeleteReversePrivateEndpoint != nil { mmDeleteReversePrivateEndpoint.inspectFuncDeleteReversePrivateEndpoint(ctx, serviceId, reversePrivateEndpointId) } @@ -4835,23 +4506,19 @@ func (mmDeleteReversePrivateEndpoint *ClientMock) DeleteReversePrivateEndpoint(c if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmDeleteReversePrivateEndpoint.t.Errorf("ClientMock.DeleteReversePrivateEndpoint got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteReversePrivateEndpoint.DeleteReversePrivateEndpointMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmDeleteReversePrivateEndpoint.t.Errorf("ClientMock.DeleteReversePrivateEndpoint got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmDeleteReversePrivateEndpoint.t.Errorf("ClientMock.DeleteReversePrivateEndpoint got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteReversePrivateEndpoint.DeleteReversePrivateEndpointMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmDeleteReversePrivateEndpoint.t.Errorf("ClientMock.DeleteReversePrivateEndpoint got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.reversePrivateEndpointId != nil && !minimock.Equal(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId) { - mmDeleteReversePrivateEndpoint.t.Errorf("ClientMock.DeleteReversePrivateEndpoint got unexpected parameter reversePrivateEndpointId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteReversePrivateEndpoint.DeleteReversePrivateEndpointMock.defaultExpectation.expectationOrigins.originReversePrivateEndpointId, *mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId, minimock.Diff(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId)) + mmDeleteReversePrivateEndpoint.t.Errorf("ClientMock.DeleteReversePrivateEndpoint got unexpected parameter reversePrivateEndpointId, want: %#v, got: %#v%s\n", *mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId, minimock.Diff(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmDeleteReversePrivateEndpoint.t.Errorf("ClientMock.DeleteReversePrivateEndpoint got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteReversePrivateEndpoint.DeleteReversePrivateEndpointMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmDeleteReversePrivateEndpoint.t.Errorf("ClientMock.DeleteReversePrivateEndpoint got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmDeleteReversePrivateEndpoint.DeleteReversePrivateEndpointMock.defaultExpectation.results @@ -4911,7 +4578,7 @@ func (m *ClientMock) MinimockDeleteReversePrivateEndpointDone() bool { func (m *ClientMock) MinimockDeleteReversePrivateEndpointInspect() { for _, e := range m.DeleteReversePrivateEndpointMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteReversePrivateEndpoint at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.DeleteReversePrivateEndpoint with params: %#v", *e.params) } } @@ -4919,19 +4586,19 @@ func (m *ClientMock) MinimockDeleteReversePrivateEndpointInspect() { // if default expectation was set then invocations count should be greater than zero if m.DeleteReversePrivateEndpointMock.defaultExpectation != nil && afterDeleteReversePrivateEndpointCounter < 1 { if m.DeleteReversePrivateEndpointMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.DeleteReversePrivateEndpoint at\n%s", m.DeleteReversePrivateEndpointMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.DeleteReversePrivateEndpoint") } else { - m.t.Errorf("Expected call to ClientMock.DeleteReversePrivateEndpoint at\n%s with params: %#v", m.DeleteReversePrivateEndpointMock.defaultExpectation.expectationOrigins.origin, *m.DeleteReversePrivateEndpointMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.DeleteReversePrivateEndpoint with params: %#v", *m.DeleteReversePrivateEndpointMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcDeleteReversePrivateEndpoint != nil && afterDeleteReversePrivateEndpointCounter < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteReversePrivateEndpoint at\n%s", m.funcDeleteReversePrivateEndpointOrigin) + m.t.Error("Expected call to ClientMock.DeleteReversePrivateEndpoint") } if !m.DeleteReversePrivateEndpointMock.invocationsDone() && afterDeleteReversePrivateEndpointCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.DeleteReversePrivateEndpoint at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.DeleteReversePrivateEndpointMock.expectedInvocations), m.DeleteReversePrivateEndpointMock.expectedInvocationsOrigin, afterDeleteReversePrivateEndpointCounter) + m.t.Errorf("Expected %d calls to ClientMock.DeleteReversePrivateEndpoint but found %d calls", + mm_atomic.LoadUint64(&m.DeleteReversePrivateEndpointMock.expectedInvocations), afterDeleteReversePrivateEndpointCounter) } } @@ -4944,19 +4611,16 @@ type mClientMockDeleteRole struct { callArgs []*ClientMockDeleteRoleParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockDeleteRoleExpectation specifies expectation struct of the Client.DeleteRole type ClientMockDeleteRoleExpectation struct { - mock *ClientMock - params *ClientMockDeleteRoleParams - paramPtrs *ClientMockDeleteRoleParamPtrs - expectationOrigins ClientMockDeleteRoleExpectationOrigins - results *ClientMockDeleteRoleResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockDeleteRoleParams + paramPtrs *ClientMockDeleteRoleParamPtrs + results *ClientMockDeleteRoleResults + Counter uint64 } // ClientMockDeleteRoleParams contains parameters of the Client.DeleteRole @@ -4978,14 +4642,6 @@ type ClientMockDeleteRoleResults struct { err error } -// ClientMockDeleteRoleOrigins contains origins of expectations of the Client.DeleteRole -type ClientMockDeleteRoleExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originName string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -5011,7 +4667,6 @@ func (mmDeleteRole *mClientMockDeleteRole) Expect(ctx context.Context, serviceID } mmDeleteRole.defaultExpectation.params = &ClientMockDeleteRoleParams{ctx, serviceID, name} - mmDeleteRole.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmDeleteRole.expectations { if minimock.Equal(e.params, mmDeleteRole.defaultExpectation.params) { mmDeleteRole.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmDeleteRole.defaultExpectation.params) @@ -5039,7 +4694,6 @@ func (mmDeleteRole *mClientMockDeleteRole) ExpectCtxParam1(ctx context.Context) mmDeleteRole.defaultExpectation.paramPtrs = &ClientMockDeleteRoleParamPtrs{} } mmDeleteRole.defaultExpectation.paramPtrs.ctx = &ctx - mmDeleteRole.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmDeleteRole } @@ -5062,7 +4716,6 @@ func (mmDeleteRole *mClientMockDeleteRole) ExpectServiceIDParam2(serviceID strin mmDeleteRole.defaultExpectation.paramPtrs = &ClientMockDeleteRoleParamPtrs{} } mmDeleteRole.defaultExpectation.paramPtrs.serviceID = &serviceID - mmDeleteRole.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmDeleteRole } @@ -5085,7 +4738,6 @@ func (mmDeleteRole *mClientMockDeleteRole) ExpectNameParam3(name string) *mClien mmDeleteRole.defaultExpectation.paramPtrs = &ClientMockDeleteRoleParamPtrs{} } mmDeleteRole.defaultExpectation.paramPtrs.name = &name - mmDeleteRole.defaultExpectation.expectationOrigins.originName = minimock.CallerInfo(1) return mmDeleteRole } @@ -5111,7 +4763,6 @@ func (mmDeleteRole *mClientMockDeleteRole) Return(err error) *ClientMock { mmDeleteRole.defaultExpectation = &ClientMockDeleteRoleExpectation{mock: mmDeleteRole.mock} } mmDeleteRole.defaultExpectation.results = &ClientMockDeleteRoleResults{err} - mmDeleteRole.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmDeleteRole.mock } @@ -5126,7 +4777,6 @@ func (mmDeleteRole *mClientMockDeleteRole) Set(f func(ctx context.Context, servi } mmDeleteRole.mock.funcDeleteRole = f - mmDeleteRole.mock.funcDeleteRoleOrigin = minimock.CallerInfo(1) return mmDeleteRole.mock } @@ -5138,9 +4788,8 @@ func (mmDeleteRole *mClientMockDeleteRole) When(ctx context.Context, serviceID s } expectation := &ClientMockDeleteRoleExpectation{ - mock: mmDeleteRole.mock, - params: &ClientMockDeleteRoleParams{ctx, serviceID, name}, - expectationOrigins: ClientMockDeleteRoleExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmDeleteRole.mock, + params: &ClientMockDeleteRoleParams{ctx, serviceID, name}, } mmDeleteRole.expectations = append(mmDeleteRole.expectations, expectation) return expectation @@ -5158,7 +4807,6 @@ func (mmDeleteRole *mClientMockDeleteRole) Times(n uint64) *mClientMockDeleteRol mmDeleteRole.mock.t.Fatalf("Times of ClientMock.DeleteRole mock can not be zero") } mm_atomic.StoreUint64(&mmDeleteRole.expectedInvocations, n) - mmDeleteRole.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmDeleteRole } @@ -5178,8 +4826,6 @@ func (mmDeleteRole *ClientMock) DeleteRole(ctx context.Context, serviceID string mm_atomic.AddUint64(&mmDeleteRole.beforeDeleteRoleCounter, 1) defer mm_atomic.AddUint64(&mmDeleteRole.afterDeleteRoleCounter, 1) - mmDeleteRole.t.Helper() - if mmDeleteRole.inspectFuncDeleteRole != nil { mmDeleteRole.inspectFuncDeleteRole(ctx, serviceID, name) } @@ -5208,23 +4854,19 @@ func (mmDeleteRole *ClientMock) DeleteRole(ctx context.Context, serviceID string if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmDeleteRole.t.Errorf("ClientMock.DeleteRole got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteRole.DeleteRoleMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmDeleteRole.t.Errorf("ClientMock.DeleteRole got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmDeleteRole.t.Errorf("ClientMock.DeleteRole got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteRole.DeleteRoleMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmDeleteRole.t.Errorf("ClientMock.DeleteRole got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.name != nil && !minimock.Equal(*mm_want_ptrs.name, mm_got.name) { - mmDeleteRole.t.Errorf("ClientMock.DeleteRole got unexpected parameter name, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteRole.DeleteRoleMock.defaultExpectation.expectationOrigins.originName, *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) + mmDeleteRole.t.Errorf("ClientMock.DeleteRole got unexpected parameter name, want: %#v, got: %#v%s\n", *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmDeleteRole.t.Errorf("ClientMock.DeleteRole got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteRole.DeleteRoleMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmDeleteRole.t.Errorf("ClientMock.DeleteRole got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmDeleteRole.DeleteRoleMock.defaultExpectation.results @@ -5284,7 +4926,7 @@ func (m *ClientMock) MinimockDeleteRoleDone() bool { func (m *ClientMock) MinimockDeleteRoleInspect() { for _, e := range m.DeleteRoleMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteRole at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.DeleteRole with params: %#v", *e.params) } } @@ -5292,19 +4934,19 @@ func (m *ClientMock) MinimockDeleteRoleInspect() { // if default expectation was set then invocations count should be greater than zero if m.DeleteRoleMock.defaultExpectation != nil && afterDeleteRoleCounter < 1 { if m.DeleteRoleMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.DeleteRole at\n%s", m.DeleteRoleMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.DeleteRole") } else { - m.t.Errorf("Expected call to ClientMock.DeleteRole at\n%s with params: %#v", m.DeleteRoleMock.defaultExpectation.expectationOrigins.origin, *m.DeleteRoleMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.DeleteRole with params: %#v", *m.DeleteRoleMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcDeleteRole != nil && afterDeleteRoleCounter < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteRole at\n%s", m.funcDeleteRoleOrigin) + m.t.Error("Expected call to ClientMock.DeleteRole") } if !m.DeleteRoleMock.invocationsDone() && afterDeleteRoleCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.DeleteRole at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.DeleteRoleMock.expectedInvocations), m.DeleteRoleMock.expectedInvocationsOrigin, afterDeleteRoleCounter) + m.t.Errorf("Expected %d calls to ClientMock.DeleteRole but found %d calls", + mm_atomic.LoadUint64(&m.DeleteRoleMock.expectedInvocations), afterDeleteRoleCounter) } } @@ -5317,19 +4959,16 @@ type mClientMockDeleteService struct { callArgs []*ClientMockDeleteServiceParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockDeleteServiceExpectation specifies expectation struct of the Client.DeleteService type ClientMockDeleteServiceExpectation struct { - mock *ClientMock - params *ClientMockDeleteServiceParams - paramPtrs *ClientMockDeleteServiceParamPtrs - expectationOrigins ClientMockDeleteServiceExpectationOrigins - results *ClientMockDeleteServiceResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockDeleteServiceParams + paramPtrs *ClientMockDeleteServiceParamPtrs + results *ClientMockDeleteServiceResults + Counter uint64 } // ClientMockDeleteServiceParams contains parameters of the Client.DeleteService @@ -5350,13 +4989,6 @@ type ClientMockDeleteServiceResults struct { err error } -// ClientMockDeleteServiceOrigins contains origins of expectations of the Client.DeleteService -type ClientMockDeleteServiceExpectationOrigins struct { - origin string - originCtx string - originServiceId string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -5382,7 +5014,6 @@ func (mmDeleteService *mClientMockDeleteService) Expect(ctx context.Context, ser } mmDeleteService.defaultExpectation.params = &ClientMockDeleteServiceParams{ctx, serviceId} - mmDeleteService.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmDeleteService.expectations { if minimock.Equal(e.params, mmDeleteService.defaultExpectation.params) { mmDeleteService.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmDeleteService.defaultExpectation.params) @@ -5410,7 +5041,6 @@ func (mmDeleteService *mClientMockDeleteService) ExpectCtxParam1(ctx context.Con mmDeleteService.defaultExpectation.paramPtrs = &ClientMockDeleteServiceParamPtrs{} } mmDeleteService.defaultExpectation.paramPtrs.ctx = &ctx - mmDeleteService.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmDeleteService } @@ -5433,7 +5063,6 @@ func (mmDeleteService *mClientMockDeleteService) ExpectServiceIdParam2(serviceId mmDeleteService.defaultExpectation.paramPtrs = &ClientMockDeleteServiceParamPtrs{} } mmDeleteService.defaultExpectation.paramPtrs.serviceId = &serviceId - mmDeleteService.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmDeleteService } @@ -5459,7 +5088,6 @@ func (mmDeleteService *mClientMockDeleteService) Return(sp1 *Service, err error) mmDeleteService.defaultExpectation = &ClientMockDeleteServiceExpectation{mock: mmDeleteService.mock} } mmDeleteService.defaultExpectation.results = &ClientMockDeleteServiceResults{sp1, err} - mmDeleteService.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmDeleteService.mock } @@ -5474,7 +5102,6 @@ func (mmDeleteService *mClientMockDeleteService) Set(f func(ctx context.Context, } mmDeleteService.mock.funcDeleteService = f - mmDeleteService.mock.funcDeleteServiceOrigin = minimock.CallerInfo(1) return mmDeleteService.mock } @@ -5486,9 +5113,8 @@ func (mmDeleteService *mClientMockDeleteService) When(ctx context.Context, servi } expectation := &ClientMockDeleteServiceExpectation{ - mock: mmDeleteService.mock, - params: &ClientMockDeleteServiceParams{ctx, serviceId}, - expectationOrigins: ClientMockDeleteServiceExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmDeleteService.mock, + params: &ClientMockDeleteServiceParams{ctx, serviceId}, } mmDeleteService.expectations = append(mmDeleteService.expectations, expectation) return expectation @@ -5506,7 +5132,6 @@ func (mmDeleteService *mClientMockDeleteService) Times(n uint64) *mClientMockDel mmDeleteService.mock.t.Fatalf("Times of ClientMock.DeleteService mock can not be zero") } mm_atomic.StoreUint64(&mmDeleteService.expectedInvocations, n) - mmDeleteService.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmDeleteService } @@ -5526,8 +5151,6 @@ func (mmDeleteService *ClientMock) DeleteService(ctx context.Context, serviceId mm_atomic.AddUint64(&mmDeleteService.beforeDeleteServiceCounter, 1) defer mm_atomic.AddUint64(&mmDeleteService.afterDeleteServiceCounter, 1) - mmDeleteService.t.Helper() - if mmDeleteService.inspectFuncDeleteService != nil { mmDeleteService.inspectFuncDeleteService(ctx, serviceId) } @@ -5556,18 +5179,15 @@ func (mmDeleteService *ClientMock) DeleteService(ctx context.Context, serviceId if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmDeleteService.t.Errorf("ClientMock.DeleteService got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteService.DeleteServiceMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmDeleteService.t.Errorf("ClientMock.DeleteService got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmDeleteService.t.Errorf("ClientMock.DeleteService got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteService.DeleteServiceMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmDeleteService.t.Errorf("ClientMock.DeleteService got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmDeleteService.t.Errorf("ClientMock.DeleteService got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteService.DeleteServiceMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmDeleteService.t.Errorf("ClientMock.DeleteService got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmDeleteService.DeleteServiceMock.defaultExpectation.results @@ -5627,7 +5247,7 @@ func (m *ClientMock) MinimockDeleteServiceDone() bool { func (m *ClientMock) MinimockDeleteServiceInspect() { for _, e := range m.DeleteServiceMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteService at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.DeleteService with params: %#v", *e.params) } } @@ -5635,19 +5255,19 @@ func (m *ClientMock) MinimockDeleteServiceInspect() { // if default expectation was set then invocations count should be greater than zero if m.DeleteServiceMock.defaultExpectation != nil && afterDeleteServiceCounter < 1 { if m.DeleteServiceMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.DeleteService at\n%s", m.DeleteServiceMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.DeleteService") } else { - m.t.Errorf("Expected call to ClientMock.DeleteService at\n%s with params: %#v", m.DeleteServiceMock.defaultExpectation.expectationOrigins.origin, *m.DeleteServiceMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.DeleteService with params: %#v", *m.DeleteServiceMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcDeleteService != nil && afterDeleteServiceCounter < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteService at\n%s", m.funcDeleteServiceOrigin) + m.t.Error("Expected call to ClientMock.DeleteService") } if !m.DeleteServiceMock.invocationsDone() && afterDeleteServiceCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.DeleteService at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.DeleteServiceMock.expectedInvocations), m.DeleteServiceMock.expectedInvocationsOrigin, afterDeleteServiceCounter) + m.t.Errorf("Expected %d calls to ClientMock.DeleteService but found %d calls", + mm_atomic.LoadUint64(&m.DeleteServiceMock.expectedInvocations), afterDeleteServiceCounter) } } @@ -5660,19 +5280,16 @@ type mClientMockDeleteUser struct { callArgs []*ClientMockDeleteUserParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockDeleteUserExpectation specifies expectation struct of the Client.DeleteUser type ClientMockDeleteUserExpectation struct { - mock *ClientMock - params *ClientMockDeleteUserParams - paramPtrs *ClientMockDeleteUserParamPtrs - expectationOrigins ClientMockDeleteUserExpectationOrigins - results *ClientMockDeleteUserResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockDeleteUserParams + paramPtrs *ClientMockDeleteUserParamPtrs + results *ClientMockDeleteUserResults + Counter uint64 } // ClientMockDeleteUserParams contains parameters of the Client.DeleteUser @@ -5694,14 +5311,6 @@ type ClientMockDeleteUserResults struct { err error } -// ClientMockDeleteUserOrigins contains origins of expectations of the Client.DeleteUser -type ClientMockDeleteUserExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originName string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -5727,7 +5336,6 @@ func (mmDeleteUser *mClientMockDeleteUser) Expect(ctx context.Context, serviceID } mmDeleteUser.defaultExpectation.params = &ClientMockDeleteUserParams{ctx, serviceID, name} - mmDeleteUser.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmDeleteUser.expectations { if minimock.Equal(e.params, mmDeleteUser.defaultExpectation.params) { mmDeleteUser.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmDeleteUser.defaultExpectation.params) @@ -5755,7 +5363,6 @@ func (mmDeleteUser *mClientMockDeleteUser) ExpectCtxParam1(ctx context.Context) mmDeleteUser.defaultExpectation.paramPtrs = &ClientMockDeleteUserParamPtrs{} } mmDeleteUser.defaultExpectation.paramPtrs.ctx = &ctx - mmDeleteUser.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmDeleteUser } @@ -5778,7 +5385,6 @@ func (mmDeleteUser *mClientMockDeleteUser) ExpectServiceIDParam2(serviceID strin mmDeleteUser.defaultExpectation.paramPtrs = &ClientMockDeleteUserParamPtrs{} } mmDeleteUser.defaultExpectation.paramPtrs.serviceID = &serviceID - mmDeleteUser.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmDeleteUser } @@ -5801,7 +5407,6 @@ func (mmDeleteUser *mClientMockDeleteUser) ExpectNameParam3(name string) *mClien mmDeleteUser.defaultExpectation.paramPtrs = &ClientMockDeleteUserParamPtrs{} } mmDeleteUser.defaultExpectation.paramPtrs.name = &name - mmDeleteUser.defaultExpectation.expectationOrigins.originName = minimock.CallerInfo(1) return mmDeleteUser } @@ -5827,7 +5432,6 @@ func (mmDeleteUser *mClientMockDeleteUser) Return(err error) *ClientMock { mmDeleteUser.defaultExpectation = &ClientMockDeleteUserExpectation{mock: mmDeleteUser.mock} } mmDeleteUser.defaultExpectation.results = &ClientMockDeleteUserResults{err} - mmDeleteUser.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmDeleteUser.mock } @@ -5842,7 +5446,6 @@ func (mmDeleteUser *mClientMockDeleteUser) Set(f func(ctx context.Context, servi } mmDeleteUser.mock.funcDeleteUser = f - mmDeleteUser.mock.funcDeleteUserOrigin = minimock.CallerInfo(1) return mmDeleteUser.mock } @@ -5854,9 +5457,8 @@ func (mmDeleteUser *mClientMockDeleteUser) When(ctx context.Context, serviceID s } expectation := &ClientMockDeleteUserExpectation{ - mock: mmDeleteUser.mock, - params: &ClientMockDeleteUserParams{ctx, serviceID, name}, - expectationOrigins: ClientMockDeleteUserExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmDeleteUser.mock, + params: &ClientMockDeleteUserParams{ctx, serviceID, name}, } mmDeleteUser.expectations = append(mmDeleteUser.expectations, expectation) return expectation @@ -5874,7 +5476,6 @@ func (mmDeleteUser *mClientMockDeleteUser) Times(n uint64) *mClientMockDeleteUse mmDeleteUser.mock.t.Fatalf("Times of ClientMock.DeleteUser mock can not be zero") } mm_atomic.StoreUint64(&mmDeleteUser.expectedInvocations, n) - mmDeleteUser.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmDeleteUser } @@ -5894,8 +5495,6 @@ func (mmDeleteUser *ClientMock) DeleteUser(ctx context.Context, serviceID string mm_atomic.AddUint64(&mmDeleteUser.beforeDeleteUserCounter, 1) defer mm_atomic.AddUint64(&mmDeleteUser.afterDeleteUserCounter, 1) - mmDeleteUser.t.Helper() - if mmDeleteUser.inspectFuncDeleteUser != nil { mmDeleteUser.inspectFuncDeleteUser(ctx, serviceID, name) } @@ -5924,23 +5523,19 @@ func (mmDeleteUser *ClientMock) DeleteUser(ctx context.Context, serviceID string if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmDeleteUser.t.Errorf("ClientMock.DeleteUser got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteUser.DeleteUserMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmDeleteUser.t.Errorf("ClientMock.DeleteUser got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmDeleteUser.t.Errorf("ClientMock.DeleteUser got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteUser.DeleteUserMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmDeleteUser.t.Errorf("ClientMock.DeleteUser got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.name != nil && !minimock.Equal(*mm_want_ptrs.name, mm_got.name) { - mmDeleteUser.t.Errorf("ClientMock.DeleteUser got unexpected parameter name, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteUser.DeleteUserMock.defaultExpectation.expectationOrigins.originName, *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) + mmDeleteUser.t.Errorf("ClientMock.DeleteUser got unexpected parameter name, want: %#v, got: %#v%s\n", *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmDeleteUser.t.Errorf("ClientMock.DeleteUser got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmDeleteUser.DeleteUserMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmDeleteUser.t.Errorf("ClientMock.DeleteUser got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmDeleteUser.DeleteUserMock.defaultExpectation.results @@ -6000,7 +5595,7 @@ func (m *ClientMock) MinimockDeleteUserDone() bool { func (m *ClientMock) MinimockDeleteUserInspect() { for _, e := range m.DeleteUserMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteUser at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.DeleteUser with params: %#v", *e.params) } } @@ -6008,19 +5603,19 @@ func (m *ClientMock) MinimockDeleteUserInspect() { // if default expectation was set then invocations count should be greater than zero if m.DeleteUserMock.defaultExpectation != nil && afterDeleteUserCounter < 1 { if m.DeleteUserMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.DeleteUser at\n%s", m.DeleteUserMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.DeleteUser") } else { - m.t.Errorf("Expected call to ClientMock.DeleteUser at\n%s with params: %#v", m.DeleteUserMock.defaultExpectation.expectationOrigins.origin, *m.DeleteUserMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.DeleteUser with params: %#v", *m.DeleteUserMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcDeleteUser != nil && afterDeleteUserCounter < 1 { - m.t.Errorf("Expected call to ClientMock.DeleteUser at\n%s", m.funcDeleteUserOrigin) + m.t.Error("Expected call to ClientMock.DeleteUser") } if !m.DeleteUserMock.invocationsDone() && afterDeleteUserCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.DeleteUser at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.DeleteUserMock.expectedInvocations), m.DeleteUserMock.expectedInvocationsOrigin, afterDeleteUserCounter) + m.t.Errorf("Expected %d calls to ClientMock.DeleteUser but found %d calls", + mm_atomic.LoadUint64(&m.DeleteUserMock.expectedInvocations), afterDeleteUserCounter) } } @@ -6033,19 +5628,16 @@ type mClientMockGetApiKeyID struct { callArgs []*ClientMockGetApiKeyIDParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetApiKeyIDExpectation specifies expectation struct of the Client.GetApiKeyID type ClientMockGetApiKeyIDExpectation struct { - mock *ClientMock - params *ClientMockGetApiKeyIDParams - paramPtrs *ClientMockGetApiKeyIDParamPtrs - expectationOrigins ClientMockGetApiKeyIDExpectationOrigins - results *ClientMockGetApiKeyIDResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetApiKeyIDParams + paramPtrs *ClientMockGetApiKeyIDParamPtrs + results *ClientMockGetApiKeyIDResults + Counter uint64 } // ClientMockGetApiKeyIDParams contains parameters of the Client.GetApiKeyID @@ -6066,13 +5658,6 @@ type ClientMockGetApiKeyIDResults struct { err error } -// ClientMockGetApiKeyIDOrigins contains origins of expectations of the Client.GetApiKeyID -type ClientMockGetApiKeyIDExpectationOrigins struct { - origin string - originCtx string - originName string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -6098,7 +5683,6 @@ func (mmGetApiKeyID *mClientMockGetApiKeyID) Expect(ctx context.Context, name *s } mmGetApiKeyID.defaultExpectation.params = &ClientMockGetApiKeyIDParams{ctx, name} - mmGetApiKeyID.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetApiKeyID.expectations { if minimock.Equal(e.params, mmGetApiKeyID.defaultExpectation.params) { mmGetApiKeyID.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetApiKeyID.defaultExpectation.params) @@ -6126,7 +5710,6 @@ func (mmGetApiKeyID *mClientMockGetApiKeyID) ExpectCtxParam1(ctx context.Context mmGetApiKeyID.defaultExpectation.paramPtrs = &ClientMockGetApiKeyIDParamPtrs{} } mmGetApiKeyID.defaultExpectation.paramPtrs.ctx = &ctx - mmGetApiKeyID.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetApiKeyID } @@ -6149,7 +5732,6 @@ func (mmGetApiKeyID *mClientMockGetApiKeyID) ExpectNameParam2(name *string) *mCl mmGetApiKeyID.defaultExpectation.paramPtrs = &ClientMockGetApiKeyIDParamPtrs{} } mmGetApiKeyID.defaultExpectation.paramPtrs.name = &name - mmGetApiKeyID.defaultExpectation.expectationOrigins.originName = minimock.CallerInfo(1) return mmGetApiKeyID } @@ -6175,7 +5757,6 @@ func (mmGetApiKeyID *mClientMockGetApiKeyID) Return(ap1 *ApiKey, err error) *Cli mmGetApiKeyID.defaultExpectation = &ClientMockGetApiKeyIDExpectation{mock: mmGetApiKeyID.mock} } mmGetApiKeyID.defaultExpectation.results = &ClientMockGetApiKeyIDResults{ap1, err} - mmGetApiKeyID.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetApiKeyID.mock } @@ -6190,7 +5771,6 @@ func (mmGetApiKeyID *mClientMockGetApiKeyID) Set(f func(ctx context.Context, nam } mmGetApiKeyID.mock.funcGetApiKeyID = f - mmGetApiKeyID.mock.funcGetApiKeyIDOrigin = minimock.CallerInfo(1) return mmGetApiKeyID.mock } @@ -6202,9 +5782,8 @@ func (mmGetApiKeyID *mClientMockGetApiKeyID) When(ctx context.Context, name *str } expectation := &ClientMockGetApiKeyIDExpectation{ - mock: mmGetApiKeyID.mock, - params: &ClientMockGetApiKeyIDParams{ctx, name}, - expectationOrigins: ClientMockGetApiKeyIDExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetApiKeyID.mock, + params: &ClientMockGetApiKeyIDParams{ctx, name}, } mmGetApiKeyID.expectations = append(mmGetApiKeyID.expectations, expectation) return expectation @@ -6222,7 +5801,6 @@ func (mmGetApiKeyID *mClientMockGetApiKeyID) Times(n uint64) *mClientMockGetApiK mmGetApiKeyID.mock.t.Fatalf("Times of ClientMock.GetApiKeyID mock can not be zero") } mm_atomic.StoreUint64(&mmGetApiKeyID.expectedInvocations, n) - mmGetApiKeyID.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetApiKeyID } @@ -6242,8 +5820,6 @@ func (mmGetApiKeyID *ClientMock) GetApiKeyID(ctx context.Context, name *string) mm_atomic.AddUint64(&mmGetApiKeyID.beforeGetApiKeyIDCounter, 1) defer mm_atomic.AddUint64(&mmGetApiKeyID.afterGetApiKeyIDCounter, 1) - mmGetApiKeyID.t.Helper() - if mmGetApiKeyID.inspectFuncGetApiKeyID != nil { mmGetApiKeyID.inspectFuncGetApiKeyID(ctx, name) } @@ -6272,18 +5848,15 @@ func (mmGetApiKeyID *ClientMock) GetApiKeyID(ctx context.Context, name *string) if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetApiKeyID.t.Errorf("ClientMock.GetApiKeyID got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetApiKeyID.GetApiKeyIDMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetApiKeyID.t.Errorf("ClientMock.GetApiKeyID got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.name != nil && !minimock.Equal(*mm_want_ptrs.name, mm_got.name) { - mmGetApiKeyID.t.Errorf("ClientMock.GetApiKeyID got unexpected parameter name, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetApiKeyID.GetApiKeyIDMock.defaultExpectation.expectationOrigins.originName, *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) + mmGetApiKeyID.t.Errorf("ClientMock.GetApiKeyID got unexpected parameter name, want: %#v, got: %#v%s\n", *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetApiKeyID.t.Errorf("ClientMock.GetApiKeyID got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetApiKeyID.GetApiKeyIDMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetApiKeyID.t.Errorf("ClientMock.GetApiKeyID got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetApiKeyID.GetApiKeyIDMock.defaultExpectation.results @@ -6343,7 +5916,7 @@ func (m *ClientMock) MinimockGetApiKeyIDDone() bool { func (m *ClientMock) MinimockGetApiKeyIDInspect() { for _, e := range m.GetApiKeyIDMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetApiKeyID at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetApiKeyID with params: %#v", *e.params) } } @@ -6351,19 +5924,19 @@ func (m *ClientMock) MinimockGetApiKeyIDInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetApiKeyIDMock.defaultExpectation != nil && afterGetApiKeyIDCounter < 1 { if m.GetApiKeyIDMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetApiKeyID at\n%s", m.GetApiKeyIDMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetApiKeyID") } else { - m.t.Errorf("Expected call to ClientMock.GetApiKeyID at\n%s with params: %#v", m.GetApiKeyIDMock.defaultExpectation.expectationOrigins.origin, *m.GetApiKeyIDMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetApiKeyID with params: %#v", *m.GetApiKeyIDMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetApiKeyID != nil && afterGetApiKeyIDCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetApiKeyID at\n%s", m.funcGetApiKeyIDOrigin) + m.t.Error("Expected call to ClientMock.GetApiKeyID") } if !m.GetApiKeyIDMock.invocationsDone() && afterGetApiKeyIDCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetApiKeyID at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetApiKeyIDMock.expectedInvocations), m.GetApiKeyIDMock.expectedInvocationsOrigin, afterGetApiKeyIDCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetApiKeyID but found %d calls", + mm_atomic.LoadUint64(&m.GetApiKeyIDMock.expectedInvocations), afterGetApiKeyIDCounter) } } @@ -6376,19 +5949,16 @@ type mClientMockGetBackupConfiguration struct { callArgs []*ClientMockGetBackupConfigurationParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetBackupConfigurationExpectation specifies expectation struct of the Client.GetBackupConfiguration type ClientMockGetBackupConfigurationExpectation struct { - mock *ClientMock - params *ClientMockGetBackupConfigurationParams - paramPtrs *ClientMockGetBackupConfigurationParamPtrs - expectationOrigins ClientMockGetBackupConfigurationExpectationOrigins - results *ClientMockGetBackupConfigurationResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetBackupConfigurationParams + paramPtrs *ClientMockGetBackupConfigurationParamPtrs + results *ClientMockGetBackupConfigurationResults + Counter uint64 } // ClientMockGetBackupConfigurationParams contains parameters of the Client.GetBackupConfiguration @@ -6409,13 +5979,6 @@ type ClientMockGetBackupConfigurationResults struct { err error } -// ClientMockGetBackupConfigurationOrigins contains origins of expectations of the Client.GetBackupConfiguration -type ClientMockGetBackupConfigurationExpectationOrigins struct { - origin string - originCtx string - originServiceId string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -6441,7 +6004,6 @@ func (mmGetBackupConfiguration *mClientMockGetBackupConfiguration) Expect(ctx co } mmGetBackupConfiguration.defaultExpectation.params = &ClientMockGetBackupConfigurationParams{ctx, serviceId} - mmGetBackupConfiguration.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetBackupConfiguration.expectations { if minimock.Equal(e.params, mmGetBackupConfiguration.defaultExpectation.params) { mmGetBackupConfiguration.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetBackupConfiguration.defaultExpectation.params) @@ -6469,7 +6031,6 @@ func (mmGetBackupConfiguration *mClientMockGetBackupConfiguration) ExpectCtxPara mmGetBackupConfiguration.defaultExpectation.paramPtrs = &ClientMockGetBackupConfigurationParamPtrs{} } mmGetBackupConfiguration.defaultExpectation.paramPtrs.ctx = &ctx - mmGetBackupConfiguration.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetBackupConfiguration } @@ -6492,7 +6053,6 @@ func (mmGetBackupConfiguration *mClientMockGetBackupConfiguration) ExpectService mmGetBackupConfiguration.defaultExpectation.paramPtrs = &ClientMockGetBackupConfigurationParamPtrs{} } mmGetBackupConfiguration.defaultExpectation.paramPtrs.serviceId = &serviceId - mmGetBackupConfiguration.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmGetBackupConfiguration } @@ -6518,7 +6078,6 @@ func (mmGetBackupConfiguration *mClientMockGetBackupConfiguration) Return(bp1 *B mmGetBackupConfiguration.defaultExpectation = &ClientMockGetBackupConfigurationExpectation{mock: mmGetBackupConfiguration.mock} } mmGetBackupConfiguration.defaultExpectation.results = &ClientMockGetBackupConfigurationResults{bp1, err} - mmGetBackupConfiguration.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetBackupConfiguration.mock } @@ -6533,7 +6092,6 @@ func (mmGetBackupConfiguration *mClientMockGetBackupConfiguration) Set(f func(ct } mmGetBackupConfiguration.mock.funcGetBackupConfiguration = f - mmGetBackupConfiguration.mock.funcGetBackupConfigurationOrigin = minimock.CallerInfo(1) return mmGetBackupConfiguration.mock } @@ -6545,9 +6103,8 @@ func (mmGetBackupConfiguration *mClientMockGetBackupConfiguration) When(ctx cont } expectation := &ClientMockGetBackupConfigurationExpectation{ - mock: mmGetBackupConfiguration.mock, - params: &ClientMockGetBackupConfigurationParams{ctx, serviceId}, - expectationOrigins: ClientMockGetBackupConfigurationExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetBackupConfiguration.mock, + params: &ClientMockGetBackupConfigurationParams{ctx, serviceId}, } mmGetBackupConfiguration.expectations = append(mmGetBackupConfiguration.expectations, expectation) return expectation @@ -6565,7 +6122,6 @@ func (mmGetBackupConfiguration *mClientMockGetBackupConfiguration) Times(n uint6 mmGetBackupConfiguration.mock.t.Fatalf("Times of ClientMock.GetBackupConfiguration mock can not be zero") } mm_atomic.StoreUint64(&mmGetBackupConfiguration.expectedInvocations, n) - mmGetBackupConfiguration.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetBackupConfiguration } @@ -6585,8 +6141,6 @@ func (mmGetBackupConfiguration *ClientMock) GetBackupConfiguration(ctx context.C mm_atomic.AddUint64(&mmGetBackupConfiguration.beforeGetBackupConfigurationCounter, 1) defer mm_atomic.AddUint64(&mmGetBackupConfiguration.afterGetBackupConfigurationCounter, 1) - mmGetBackupConfiguration.t.Helper() - if mmGetBackupConfiguration.inspectFuncGetBackupConfiguration != nil { mmGetBackupConfiguration.inspectFuncGetBackupConfiguration(ctx, serviceId) } @@ -6615,18 +6169,15 @@ func (mmGetBackupConfiguration *ClientMock) GetBackupConfiguration(ctx context.C if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetBackupConfiguration.t.Errorf("ClientMock.GetBackupConfiguration got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetBackupConfiguration.GetBackupConfigurationMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetBackupConfiguration.t.Errorf("ClientMock.GetBackupConfiguration got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmGetBackupConfiguration.t.Errorf("ClientMock.GetBackupConfiguration got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetBackupConfiguration.GetBackupConfigurationMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmGetBackupConfiguration.t.Errorf("ClientMock.GetBackupConfiguration got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetBackupConfiguration.t.Errorf("ClientMock.GetBackupConfiguration got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetBackupConfiguration.GetBackupConfigurationMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetBackupConfiguration.t.Errorf("ClientMock.GetBackupConfiguration got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetBackupConfiguration.GetBackupConfigurationMock.defaultExpectation.results @@ -6686,7 +6237,7 @@ func (m *ClientMock) MinimockGetBackupConfigurationDone() bool { func (m *ClientMock) MinimockGetBackupConfigurationInspect() { for _, e := range m.GetBackupConfigurationMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetBackupConfiguration at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetBackupConfiguration with params: %#v", *e.params) } } @@ -6694,19 +6245,19 @@ func (m *ClientMock) MinimockGetBackupConfigurationInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetBackupConfigurationMock.defaultExpectation != nil && afterGetBackupConfigurationCounter < 1 { if m.GetBackupConfigurationMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetBackupConfiguration at\n%s", m.GetBackupConfigurationMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetBackupConfiguration") } else { - m.t.Errorf("Expected call to ClientMock.GetBackupConfiguration at\n%s with params: %#v", m.GetBackupConfigurationMock.defaultExpectation.expectationOrigins.origin, *m.GetBackupConfigurationMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetBackupConfiguration with params: %#v", *m.GetBackupConfigurationMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetBackupConfiguration != nil && afterGetBackupConfigurationCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetBackupConfiguration at\n%s", m.funcGetBackupConfigurationOrigin) + m.t.Error("Expected call to ClientMock.GetBackupConfiguration") } if !m.GetBackupConfigurationMock.invocationsDone() && afterGetBackupConfigurationCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetBackupConfiguration at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetBackupConfigurationMock.expectedInvocations), m.GetBackupConfigurationMock.expectedInvocationsOrigin, afterGetBackupConfigurationCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetBackupConfiguration but found %d calls", + mm_atomic.LoadUint64(&m.GetBackupConfigurationMock.expectedInvocations), afterGetBackupConfigurationCounter) } } @@ -6719,19 +6270,16 @@ type mClientMockGetClickPipe struct { callArgs []*ClientMockGetClickPipeParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetClickPipeExpectation specifies expectation struct of the Client.GetClickPipe type ClientMockGetClickPipeExpectation struct { - mock *ClientMock - params *ClientMockGetClickPipeParams - paramPtrs *ClientMockGetClickPipeParamPtrs - expectationOrigins ClientMockGetClickPipeExpectationOrigins - results *ClientMockGetClickPipeResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetClickPipeParams + paramPtrs *ClientMockGetClickPipeParamPtrs + results *ClientMockGetClickPipeResults + Counter uint64 } // ClientMockGetClickPipeParams contains parameters of the Client.GetClickPipe @@ -6754,14 +6302,6 @@ type ClientMockGetClickPipeResults struct { err error } -// ClientMockGetClickPipeOrigins contains origins of expectations of the Client.GetClickPipe -type ClientMockGetClickPipeExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originClickPipeId string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -6787,7 +6327,6 @@ func (mmGetClickPipe *mClientMockGetClickPipe) Expect(ctx context.Context, servi } mmGetClickPipe.defaultExpectation.params = &ClientMockGetClickPipeParams{ctx, serviceId, clickPipeId} - mmGetClickPipe.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetClickPipe.expectations { if minimock.Equal(e.params, mmGetClickPipe.defaultExpectation.params) { mmGetClickPipe.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetClickPipe.defaultExpectation.params) @@ -6815,7 +6354,6 @@ func (mmGetClickPipe *mClientMockGetClickPipe) ExpectCtxParam1(ctx context.Conte mmGetClickPipe.defaultExpectation.paramPtrs = &ClientMockGetClickPipeParamPtrs{} } mmGetClickPipe.defaultExpectation.paramPtrs.ctx = &ctx - mmGetClickPipe.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetClickPipe } @@ -6838,7 +6376,6 @@ func (mmGetClickPipe *mClientMockGetClickPipe) ExpectServiceIdParam2(serviceId s mmGetClickPipe.defaultExpectation.paramPtrs = &ClientMockGetClickPipeParamPtrs{} } mmGetClickPipe.defaultExpectation.paramPtrs.serviceId = &serviceId - mmGetClickPipe.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmGetClickPipe } @@ -6861,7 +6398,6 @@ func (mmGetClickPipe *mClientMockGetClickPipe) ExpectClickPipeIdParam3(clickPipe mmGetClickPipe.defaultExpectation.paramPtrs = &ClientMockGetClickPipeParamPtrs{} } mmGetClickPipe.defaultExpectation.paramPtrs.clickPipeId = &clickPipeId - mmGetClickPipe.defaultExpectation.expectationOrigins.originClickPipeId = minimock.CallerInfo(1) return mmGetClickPipe } @@ -6887,7 +6423,6 @@ func (mmGetClickPipe *mClientMockGetClickPipe) Return(cp1 *ClickPipe, err error) mmGetClickPipe.defaultExpectation = &ClientMockGetClickPipeExpectation{mock: mmGetClickPipe.mock} } mmGetClickPipe.defaultExpectation.results = &ClientMockGetClickPipeResults{cp1, err} - mmGetClickPipe.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetClickPipe.mock } @@ -6902,7 +6437,6 @@ func (mmGetClickPipe *mClientMockGetClickPipe) Set(f func(ctx context.Context, s } mmGetClickPipe.mock.funcGetClickPipe = f - mmGetClickPipe.mock.funcGetClickPipeOrigin = minimock.CallerInfo(1) return mmGetClickPipe.mock } @@ -6914,9 +6448,8 @@ func (mmGetClickPipe *mClientMockGetClickPipe) When(ctx context.Context, service } expectation := &ClientMockGetClickPipeExpectation{ - mock: mmGetClickPipe.mock, - params: &ClientMockGetClickPipeParams{ctx, serviceId, clickPipeId}, - expectationOrigins: ClientMockGetClickPipeExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetClickPipe.mock, + params: &ClientMockGetClickPipeParams{ctx, serviceId, clickPipeId}, } mmGetClickPipe.expectations = append(mmGetClickPipe.expectations, expectation) return expectation @@ -6934,7 +6467,6 @@ func (mmGetClickPipe *mClientMockGetClickPipe) Times(n uint64) *mClientMockGetCl mmGetClickPipe.mock.t.Fatalf("Times of ClientMock.GetClickPipe mock can not be zero") } mm_atomic.StoreUint64(&mmGetClickPipe.expectedInvocations, n) - mmGetClickPipe.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetClickPipe } @@ -6954,8 +6486,6 @@ func (mmGetClickPipe *ClientMock) GetClickPipe(ctx context.Context, serviceId st mm_atomic.AddUint64(&mmGetClickPipe.beforeGetClickPipeCounter, 1) defer mm_atomic.AddUint64(&mmGetClickPipe.afterGetClickPipeCounter, 1) - mmGetClickPipe.t.Helper() - if mmGetClickPipe.inspectFuncGetClickPipe != nil { mmGetClickPipe.inspectFuncGetClickPipe(ctx, serviceId, clickPipeId) } @@ -6984,23 +6514,19 @@ func (mmGetClickPipe *ClientMock) GetClickPipe(ctx context.Context, serviceId st if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetClickPipe.t.Errorf("ClientMock.GetClickPipe got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetClickPipe.GetClickPipeMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetClickPipe.t.Errorf("ClientMock.GetClickPipe got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmGetClickPipe.t.Errorf("ClientMock.GetClickPipe got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetClickPipe.GetClickPipeMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmGetClickPipe.t.Errorf("ClientMock.GetClickPipe got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.clickPipeId != nil && !minimock.Equal(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId) { - mmGetClickPipe.t.Errorf("ClientMock.GetClickPipe got unexpected parameter clickPipeId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetClickPipe.GetClickPipeMock.defaultExpectation.expectationOrigins.originClickPipeId, *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) + mmGetClickPipe.t.Errorf("ClientMock.GetClickPipe got unexpected parameter clickPipeId, want: %#v, got: %#v%s\n", *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetClickPipe.t.Errorf("ClientMock.GetClickPipe got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetClickPipe.GetClickPipeMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetClickPipe.t.Errorf("ClientMock.GetClickPipe got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetClickPipe.GetClickPipeMock.defaultExpectation.results @@ -7060,7 +6586,7 @@ func (m *ClientMock) MinimockGetClickPipeDone() bool { func (m *ClientMock) MinimockGetClickPipeInspect() { for _, e := range m.GetClickPipeMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetClickPipe at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetClickPipe with params: %#v", *e.params) } } @@ -7068,19 +6594,19 @@ func (m *ClientMock) MinimockGetClickPipeInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetClickPipeMock.defaultExpectation != nil && afterGetClickPipeCounter < 1 { if m.GetClickPipeMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetClickPipe at\n%s", m.GetClickPipeMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetClickPipe") } else { - m.t.Errorf("Expected call to ClientMock.GetClickPipe at\n%s with params: %#v", m.GetClickPipeMock.defaultExpectation.expectationOrigins.origin, *m.GetClickPipeMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetClickPipe with params: %#v", *m.GetClickPipeMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetClickPipe != nil && afterGetClickPipeCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetClickPipe at\n%s", m.funcGetClickPipeOrigin) + m.t.Error("Expected call to ClientMock.GetClickPipe") } if !m.GetClickPipeMock.invocationsDone() && afterGetClickPipeCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetClickPipe at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetClickPipeMock.expectedInvocations), m.GetClickPipeMock.expectedInvocationsOrigin, afterGetClickPipeCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetClickPipe but found %d calls", + mm_atomic.LoadUint64(&m.GetClickPipeMock.expectedInvocations), afterGetClickPipeCounter) } } @@ -7093,19 +6619,16 @@ type mClientMockGetDatabase struct { callArgs []*ClientMockGetDatabaseParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetDatabaseExpectation specifies expectation struct of the Client.GetDatabase type ClientMockGetDatabaseExpectation struct { - mock *ClientMock - params *ClientMockGetDatabaseParams - paramPtrs *ClientMockGetDatabaseParamPtrs - expectationOrigins ClientMockGetDatabaseExpectationOrigins - results *ClientMockGetDatabaseResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetDatabaseParams + paramPtrs *ClientMockGetDatabaseParamPtrs + results *ClientMockGetDatabaseResults + Counter uint64 } // ClientMockGetDatabaseParams contains parameters of the Client.GetDatabase @@ -7128,14 +6651,6 @@ type ClientMockGetDatabaseResults struct { err error } -// ClientMockGetDatabaseOrigins contains origins of expectations of the Client.GetDatabase -type ClientMockGetDatabaseExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originName string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -7161,7 +6676,6 @@ func (mmGetDatabase *mClientMockGetDatabase) Expect(ctx context.Context, service } mmGetDatabase.defaultExpectation.params = &ClientMockGetDatabaseParams{ctx, serviceID, name} - mmGetDatabase.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetDatabase.expectations { if minimock.Equal(e.params, mmGetDatabase.defaultExpectation.params) { mmGetDatabase.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetDatabase.defaultExpectation.params) @@ -7189,7 +6703,6 @@ func (mmGetDatabase *mClientMockGetDatabase) ExpectCtxParam1(ctx context.Context mmGetDatabase.defaultExpectation.paramPtrs = &ClientMockGetDatabaseParamPtrs{} } mmGetDatabase.defaultExpectation.paramPtrs.ctx = &ctx - mmGetDatabase.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetDatabase } @@ -7212,7 +6725,6 @@ func (mmGetDatabase *mClientMockGetDatabase) ExpectServiceIDParam2(serviceID str mmGetDatabase.defaultExpectation.paramPtrs = &ClientMockGetDatabaseParamPtrs{} } mmGetDatabase.defaultExpectation.paramPtrs.serviceID = &serviceID - mmGetDatabase.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmGetDatabase } @@ -7235,7 +6747,6 @@ func (mmGetDatabase *mClientMockGetDatabase) ExpectNameParam3(name string) *mCli mmGetDatabase.defaultExpectation.paramPtrs = &ClientMockGetDatabaseParamPtrs{} } mmGetDatabase.defaultExpectation.paramPtrs.name = &name - mmGetDatabase.defaultExpectation.expectationOrigins.originName = minimock.CallerInfo(1) return mmGetDatabase } @@ -7261,7 +6772,6 @@ func (mmGetDatabase *mClientMockGetDatabase) Return(dp1 *Database, err error) *C mmGetDatabase.defaultExpectation = &ClientMockGetDatabaseExpectation{mock: mmGetDatabase.mock} } mmGetDatabase.defaultExpectation.results = &ClientMockGetDatabaseResults{dp1, err} - mmGetDatabase.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetDatabase.mock } @@ -7276,7 +6786,6 @@ func (mmGetDatabase *mClientMockGetDatabase) Set(f func(ctx context.Context, ser } mmGetDatabase.mock.funcGetDatabase = f - mmGetDatabase.mock.funcGetDatabaseOrigin = minimock.CallerInfo(1) return mmGetDatabase.mock } @@ -7288,9 +6797,8 @@ func (mmGetDatabase *mClientMockGetDatabase) When(ctx context.Context, serviceID } expectation := &ClientMockGetDatabaseExpectation{ - mock: mmGetDatabase.mock, - params: &ClientMockGetDatabaseParams{ctx, serviceID, name}, - expectationOrigins: ClientMockGetDatabaseExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetDatabase.mock, + params: &ClientMockGetDatabaseParams{ctx, serviceID, name}, } mmGetDatabase.expectations = append(mmGetDatabase.expectations, expectation) return expectation @@ -7308,7 +6816,6 @@ func (mmGetDatabase *mClientMockGetDatabase) Times(n uint64) *mClientMockGetData mmGetDatabase.mock.t.Fatalf("Times of ClientMock.GetDatabase mock can not be zero") } mm_atomic.StoreUint64(&mmGetDatabase.expectedInvocations, n) - mmGetDatabase.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetDatabase } @@ -7328,8 +6835,6 @@ func (mmGetDatabase *ClientMock) GetDatabase(ctx context.Context, serviceID stri mm_atomic.AddUint64(&mmGetDatabase.beforeGetDatabaseCounter, 1) defer mm_atomic.AddUint64(&mmGetDatabase.afterGetDatabaseCounter, 1) - mmGetDatabase.t.Helper() - if mmGetDatabase.inspectFuncGetDatabase != nil { mmGetDatabase.inspectFuncGetDatabase(ctx, serviceID, name) } @@ -7358,23 +6863,19 @@ func (mmGetDatabase *ClientMock) GetDatabase(ctx context.Context, serviceID stri if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetDatabase.t.Errorf("ClientMock.GetDatabase got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetDatabase.GetDatabaseMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetDatabase.t.Errorf("ClientMock.GetDatabase got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmGetDatabase.t.Errorf("ClientMock.GetDatabase got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetDatabase.GetDatabaseMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmGetDatabase.t.Errorf("ClientMock.GetDatabase got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.name != nil && !minimock.Equal(*mm_want_ptrs.name, mm_got.name) { - mmGetDatabase.t.Errorf("ClientMock.GetDatabase got unexpected parameter name, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetDatabase.GetDatabaseMock.defaultExpectation.expectationOrigins.originName, *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) + mmGetDatabase.t.Errorf("ClientMock.GetDatabase got unexpected parameter name, want: %#v, got: %#v%s\n", *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetDatabase.t.Errorf("ClientMock.GetDatabase got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetDatabase.GetDatabaseMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetDatabase.t.Errorf("ClientMock.GetDatabase got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetDatabase.GetDatabaseMock.defaultExpectation.results @@ -7434,7 +6935,7 @@ func (m *ClientMock) MinimockGetDatabaseDone() bool { func (m *ClientMock) MinimockGetDatabaseInspect() { for _, e := range m.GetDatabaseMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetDatabase at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetDatabase with params: %#v", *e.params) } } @@ -7442,19 +6943,19 @@ func (m *ClientMock) MinimockGetDatabaseInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetDatabaseMock.defaultExpectation != nil && afterGetDatabaseCounter < 1 { if m.GetDatabaseMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetDatabase at\n%s", m.GetDatabaseMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetDatabase") } else { - m.t.Errorf("Expected call to ClientMock.GetDatabase at\n%s with params: %#v", m.GetDatabaseMock.defaultExpectation.expectationOrigins.origin, *m.GetDatabaseMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetDatabase with params: %#v", *m.GetDatabaseMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetDatabase != nil && afterGetDatabaseCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetDatabase at\n%s", m.funcGetDatabaseOrigin) + m.t.Error("Expected call to ClientMock.GetDatabase") } if !m.GetDatabaseMock.invocationsDone() && afterGetDatabaseCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetDatabase at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetDatabaseMock.expectedInvocations), m.GetDatabaseMock.expectedInvocationsOrigin, afterGetDatabaseCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetDatabase but found %d calls", + mm_atomic.LoadUint64(&m.GetDatabaseMock.expectedInvocations), afterGetDatabaseCounter) } } @@ -7467,19 +6968,16 @@ type mClientMockGetGrantPrivilege struct { callArgs []*ClientMockGetGrantPrivilegeParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetGrantPrivilegeExpectation specifies expectation struct of the Client.GetGrantPrivilege type ClientMockGetGrantPrivilegeExpectation struct { - mock *ClientMock - params *ClientMockGetGrantPrivilegeParams - paramPtrs *ClientMockGetGrantPrivilegeParamPtrs - expectationOrigins ClientMockGetGrantPrivilegeExpectationOrigins - results *ClientMockGetGrantPrivilegeResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetGrantPrivilegeParams + paramPtrs *ClientMockGetGrantPrivilegeParamPtrs + results *ClientMockGetGrantPrivilegeResults + Counter uint64 } // ClientMockGetGrantPrivilegeParams contains parameters of the Client.GetGrantPrivilege @@ -7512,19 +7010,6 @@ type ClientMockGetGrantPrivilegeResults struct { err error } -// ClientMockGetGrantPrivilegeOrigins contains origins of expectations of the Client.GetGrantPrivilege -type ClientMockGetGrantPrivilegeExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originAccessType string - originDatabase string - originTable string - originColumn string - originGranteeUserName string - originGranteeRoleName string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -7550,7 +7035,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) Expect(ctx context.Cont } mmGetGrantPrivilege.defaultExpectation.params = &ClientMockGetGrantPrivilegeParams{ctx, serviceID, accessType, database, table, column, granteeUserName, granteeRoleName} - mmGetGrantPrivilege.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetGrantPrivilege.expectations { if minimock.Equal(e.params, mmGetGrantPrivilege.defaultExpectation.params) { mmGetGrantPrivilege.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetGrantPrivilege.defaultExpectation.params) @@ -7578,7 +7062,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) ExpectCtxParam1(ctx con mmGetGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockGetGrantPrivilegeParamPtrs{} } mmGetGrantPrivilege.defaultExpectation.paramPtrs.ctx = &ctx - mmGetGrantPrivilege.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetGrantPrivilege } @@ -7601,7 +7084,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) ExpectServiceIDParam2(s mmGetGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockGetGrantPrivilegeParamPtrs{} } mmGetGrantPrivilege.defaultExpectation.paramPtrs.serviceID = &serviceID - mmGetGrantPrivilege.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmGetGrantPrivilege } @@ -7624,7 +7106,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) ExpectAccessTypeParam3( mmGetGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockGetGrantPrivilegeParamPtrs{} } mmGetGrantPrivilege.defaultExpectation.paramPtrs.accessType = &accessType - mmGetGrantPrivilege.defaultExpectation.expectationOrigins.originAccessType = minimock.CallerInfo(1) return mmGetGrantPrivilege } @@ -7647,7 +7128,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) ExpectDatabaseParam4(da mmGetGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockGetGrantPrivilegeParamPtrs{} } mmGetGrantPrivilege.defaultExpectation.paramPtrs.database = &database - mmGetGrantPrivilege.defaultExpectation.expectationOrigins.originDatabase = minimock.CallerInfo(1) return mmGetGrantPrivilege } @@ -7670,7 +7150,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) ExpectTableParam5(table mmGetGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockGetGrantPrivilegeParamPtrs{} } mmGetGrantPrivilege.defaultExpectation.paramPtrs.table = &table - mmGetGrantPrivilege.defaultExpectation.expectationOrigins.originTable = minimock.CallerInfo(1) return mmGetGrantPrivilege } @@ -7693,7 +7172,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) ExpectColumnParam6(colu mmGetGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockGetGrantPrivilegeParamPtrs{} } mmGetGrantPrivilege.defaultExpectation.paramPtrs.column = &column - mmGetGrantPrivilege.defaultExpectation.expectationOrigins.originColumn = minimock.CallerInfo(1) return mmGetGrantPrivilege } @@ -7716,7 +7194,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) ExpectGranteeUserNamePa mmGetGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockGetGrantPrivilegeParamPtrs{} } mmGetGrantPrivilege.defaultExpectation.paramPtrs.granteeUserName = &granteeUserName - mmGetGrantPrivilege.defaultExpectation.expectationOrigins.originGranteeUserName = minimock.CallerInfo(1) return mmGetGrantPrivilege } @@ -7739,7 +7216,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) ExpectGranteeRoleNamePa mmGetGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockGetGrantPrivilegeParamPtrs{} } mmGetGrantPrivilege.defaultExpectation.paramPtrs.granteeRoleName = &granteeRoleName - mmGetGrantPrivilege.defaultExpectation.expectationOrigins.originGranteeRoleName = minimock.CallerInfo(1) return mmGetGrantPrivilege } @@ -7765,7 +7241,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) Return(gp1 *GrantPrivil mmGetGrantPrivilege.defaultExpectation = &ClientMockGetGrantPrivilegeExpectation{mock: mmGetGrantPrivilege.mock} } mmGetGrantPrivilege.defaultExpectation.results = &ClientMockGetGrantPrivilegeResults{gp1, err} - mmGetGrantPrivilege.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetGrantPrivilege.mock } @@ -7780,7 +7255,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) Set(f func(ctx context. } mmGetGrantPrivilege.mock.funcGetGrantPrivilege = f - mmGetGrantPrivilege.mock.funcGetGrantPrivilegeOrigin = minimock.CallerInfo(1) return mmGetGrantPrivilege.mock } @@ -7792,9 +7266,8 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) When(ctx context.Contex } expectation := &ClientMockGetGrantPrivilegeExpectation{ - mock: mmGetGrantPrivilege.mock, - params: &ClientMockGetGrantPrivilegeParams{ctx, serviceID, accessType, database, table, column, granteeUserName, granteeRoleName}, - expectationOrigins: ClientMockGetGrantPrivilegeExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetGrantPrivilege.mock, + params: &ClientMockGetGrantPrivilegeParams{ctx, serviceID, accessType, database, table, column, granteeUserName, granteeRoleName}, } mmGetGrantPrivilege.expectations = append(mmGetGrantPrivilege.expectations, expectation) return expectation @@ -7812,7 +7285,6 @@ func (mmGetGrantPrivilege *mClientMockGetGrantPrivilege) Times(n uint64) *mClien mmGetGrantPrivilege.mock.t.Fatalf("Times of ClientMock.GetGrantPrivilege mock can not be zero") } mm_atomic.StoreUint64(&mmGetGrantPrivilege.expectedInvocations, n) - mmGetGrantPrivilege.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetGrantPrivilege } @@ -7832,8 +7304,6 @@ func (mmGetGrantPrivilege *ClientMock) GetGrantPrivilege(ctx context.Context, se mm_atomic.AddUint64(&mmGetGrantPrivilege.beforeGetGrantPrivilegeCounter, 1) defer mm_atomic.AddUint64(&mmGetGrantPrivilege.afterGetGrantPrivilegeCounter, 1) - mmGetGrantPrivilege.t.Helper() - if mmGetGrantPrivilege.inspectFuncGetGrantPrivilege != nil { mmGetGrantPrivilege.inspectFuncGetGrantPrivilege(ctx, serviceID, accessType, database, table, column, granteeUserName, granteeRoleName) } @@ -7862,48 +7332,39 @@ func (mmGetGrantPrivilege *ClientMock) GetGrantPrivilege(ctx context.Context, se if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantPrivilege.GetGrantPrivilegeMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantPrivilege.GetGrantPrivilegeMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.accessType != nil && !minimock.Equal(*mm_want_ptrs.accessType, mm_got.accessType) { - mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter accessType, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantPrivilege.GetGrantPrivilegeMock.defaultExpectation.expectationOrigins.originAccessType, *mm_want_ptrs.accessType, mm_got.accessType, minimock.Diff(*mm_want_ptrs.accessType, mm_got.accessType)) + mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter accessType, want: %#v, got: %#v%s\n", *mm_want_ptrs.accessType, mm_got.accessType, minimock.Diff(*mm_want_ptrs.accessType, mm_got.accessType)) } if mm_want_ptrs.database != nil && !minimock.Equal(*mm_want_ptrs.database, mm_got.database) { - mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter database, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantPrivilege.GetGrantPrivilegeMock.defaultExpectation.expectationOrigins.originDatabase, *mm_want_ptrs.database, mm_got.database, minimock.Diff(*mm_want_ptrs.database, mm_got.database)) + mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter database, want: %#v, got: %#v%s\n", *mm_want_ptrs.database, mm_got.database, minimock.Diff(*mm_want_ptrs.database, mm_got.database)) } if mm_want_ptrs.table != nil && !minimock.Equal(*mm_want_ptrs.table, mm_got.table) { - mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter table, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantPrivilege.GetGrantPrivilegeMock.defaultExpectation.expectationOrigins.originTable, *mm_want_ptrs.table, mm_got.table, minimock.Diff(*mm_want_ptrs.table, mm_got.table)) + mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter table, want: %#v, got: %#v%s\n", *mm_want_ptrs.table, mm_got.table, minimock.Diff(*mm_want_ptrs.table, mm_got.table)) } if mm_want_ptrs.column != nil && !minimock.Equal(*mm_want_ptrs.column, mm_got.column) { - mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter column, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantPrivilege.GetGrantPrivilegeMock.defaultExpectation.expectationOrigins.originColumn, *mm_want_ptrs.column, mm_got.column, minimock.Diff(*mm_want_ptrs.column, mm_got.column)) + mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter column, want: %#v, got: %#v%s\n", *mm_want_ptrs.column, mm_got.column, minimock.Diff(*mm_want_ptrs.column, mm_got.column)) } if mm_want_ptrs.granteeUserName != nil && !minimock.Equal(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName) { - mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter granteeUserName, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantPrivilege.GetGrantPrivilegeMock.defaultExpectation.expectationOrigins.originGranteeUserName, *mm_want_ptrs.granteeUserName, mm_got.granteeUserName, minimock.Diff(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName)) + mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter granteeUserName, want: %#v, got: %#v%s\n", *mm_want_ptrs.granteeUserName, mm_got.granteeUserName, minimock.Diff(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName)) } if mm_want_ptrs.granteeRoleName != nil && !minimock.Equal(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName) { - mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter granteeRoleName, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantPrivilege.GetGrantPrivilegeMock.defaultExpectation.expectationOrigins.originGranteeRoleName, *mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName, minimock.Diff(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName)) + mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameter granteeRoleName, want: %#v, got: %#v%s\n", *mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName, minimock.Diff(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantPrivilege.GetGrantPrivilegeMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetGrantPrivilege.t.Errorf("ClientMock.GetGrantPrivilege got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetGrantPrivilege.GetGrantPrivilegeMock.defaultExpectation.results @@ -7963,7 +7424,7 @@ func (m *ClientMock) MinimockGetGrantPrivilegeDone() bool { func (m *ClientMock) MinimockGetGrantPrivilegeInspect() { for _, e := range m.GetGrantPrivilegeMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetGrantPrivilege at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetGrantPrivilege with params: %#v", *e.params) } } @@ -7971,19 +7432,19 @@ func (m *ClientMock) MinimockGetGrantPrivilegeInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetGrantPrivilegeMock.defaultExpectation != nil && afterGetGrantPrivilegeCounter < 1 { if m.GetGrantPrivilegeMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetGrantPrivilege at\n%s", m.GetGrantPrivilegeMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetGrantPrivilege") } else { - m.t.Errorf("Expected call to ClientMock.GetGrantPrivilege at\n%s with params: %#v", m.GetGrantPrivilegeMock.defaultExpectation.expectationOrigins.origin, *m.GetGrantPrivilegeMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetGrantPrivilege with params: %#v", *m.GetGrantPrivilegeMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetGrantPrivilege != nil && afterGetGrantPrivilegeCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetGrantPrivilege at\n%s", m.funcGetGrantPrivilegeOrigin) + m.t.Error("Expected call to ClientMock.GetGrantPrivilege") } if !m.GetGrantPrivilegeMock.invocationsDone() && afterGetGrantPrivilegeCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetGrantPrivilege at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetGrantPrivilegeMock.expectedInvocations), m.GetGrantPrivilegeMock.expectedInvocationsOrigin, afterGetGrantPrivilegeCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetGrantPrivilege but found %d calls", + mm_atomic.LoadUint64(&m.GetGrantPrivilegeMock.expectedInvocations), afterGetGrantPrivilegeCounter) } } @@ -7996,19 +7457,16 @@ type mClientMockGetGrantRole struct { callArgs []*ClientMockGetGrantRoleParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetGrantRoleExpectation specifies expectation struct of the Client.GetGrantRole type ClientMockGetGrantRoleExpectation struct { - mock *ClientMock - params *ClientMockGetGrantRoleParams - paramPtrs *ClientMockGetGrantRoleParamPtrs - expectationOrigins ClientMockGetGrantRoleExpectationOrigins - results *ClientMockGetGrantRoleResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetGrantRoleParams + paramPtrs *ClientMockGetGrantRoleParamPtrs + results *ClientMockGetGrantRoleResults + Counter uint64 } // ClientMockGetGrantRoleParams contains parameters of the Client.GetGrantRole @@ -8035,16 +7493,6 @@ type ClientMockGetGrantRoleResults struct { err error } -// ClientMockGetGrantRoleOrigins contains origins of expectations of the Client.GetGrantRole -type ClientMockGetGrantRoleExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originGrantedRoleName string - originGranteeUserName string - originGranteeRoleName string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -8070,7 +7518,6 @@ func (mmGetGrantRole *mClientMockGetGrantRole) Expect(ctx context.Context, servi } mmGetGrantRole.defaultExpectation.params = &ClientMockGetGrantRoleParams{ctx, serviceID, grantedRoleName, granteeUserName, granteeRoleName} - mmGetGrantRole.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetGrantRole.expectations { if minimock.Equal(e.params, mmGetGrantRole.defaultExpectation.params) { mmGetGrantRole.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetGrantRole.defaultExpectation.params) @@ -8098,7 +7545,6 @@ func (mmGetGrantRole *mClientMockGetGrantRole) ExpectCtxParam1(ctx context.Conte mmGetGrantRole.defaultExpectation.paramPtrs = &ClientMockGetGrantRoleParamPtrs{} } mmGetGrantRole.defaultExpectation.paramPtrs.ctx = &ctx - mmGetGrantRole.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetGrantRole } @@ -8121,7 +7567,6 @@ func (mmGetGrantRole *mClientMockGetGrantRole) ExpectServiceIDParam2(serviceID s mmGetGrantRole.defaultExpectation.paramPtrs = &ClientMockGetGrantRoleParamPtrs{} } mmGetGrantRole.defaultExpectation.paramPtrs.serviceID = &serviceID - mmGetGrantRole.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmGetGrantRole } @@ -8144,7 +7589,6 @@ func (mmGetGrantRole *mClientMockGetGrantRole) ExpectGrantedRoleNameParam3(grant mmGetGrantRole.defaultExpectation.paramPtrs = &ClientMockGetGrantRoleParamPtrs{} } mmGetGrantRole.defaultExpectation.paramPtrs.grantedRoleName = &grantedRoleName - mmGetGrantRole.defaultExpectation.expectationOrigins.originGrantedRoleName = minimock.CallerInfo(1) return mmGetGrantRole } @@ -8167,7 +7611,6 @@ func (mmGetGrantRole *mClientMockGetGrantRole) ExpectGranteeUserNameParam4(grant mmGetGrantRole.defaultExpectation.paramPtrs = &ClientMockGetGrantRoleParamPtrs{} } mmGetGrantRole.defaultExpectation.paramPtrs.granteeUserName = &granteeUserName - mmGetGrantRole.defaultExpectation.expectationOrigins.originGranteeUserName = minimock.CallerInfo(1) return mmGetGrantRole } @@ -8190,7 +7633,6 @@ func (mmGetGrantRole *mClientMockGetGrantRole) ExpectGranteeRoleNameParam5(grant mmGetGrantRole.defaultExpectation.paramPtrs = &ClientMockGetGrantRoleParamPtrs{} } mmGetGrantRole.defaultExpectation.paramPtrs.granteeRoleName = &granteeRoleName - mmGetGrantRole.defaultExpectation.expectationOrigins.originGranteeRoleName = minimock.CallerInfo(1) return mmGetGrantRole } @@ -8216,7 +7658,6 @@ func (mmGetGrantRole *mClientMockGetGrantRole) Return(gp1 *GrantRole, err error) mmGetGrantRole.defaultExpectation = &ClientMockGetGrantRoleExpectation{mock: mmGetGrantRole.mock} } mmGetGrantRole.defaultExpectation.results = &ClientMockGetGrantRoleResults{gp1, err} - mmGetGrantRole.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetGrantRole.mock } @@ -8231,7 +7672,6 @@ func (mmGetGrantRole *mClientMockGetGrantRole) Set(f func(ctx context.Context, s } mmGetGrantRole.mock.funcGetGrantRole = f - mmGetGrantRole.mock.funcGetGrantRoleOrigin = minimock.CallerInfo(1) return mmGetGrantRole.mock } @@ -8243,9 +7683,8 @@ func (mmGetGrantRole *mClientMockGetGrantRole) When(ctx context.Context, service } expectation := &ClientMockGetGrantRoleExpectation{ - mock: mmGetGrantRole.mock, - params: &ClientMockGetGrantRoleParams{ctx, serviceID, grantedRoleName, granteeUserName, granteeRoleName}, - expectationOrigins: ClientMockGetGrantRoleExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetGrantRole.mock, + params: &ClientMockGetGrantRoleParams{ctx, serviceID, grantedRoleName, granteeUserName, granteeRoleName}, } mmGetGrantRole.expectations = append(mmGetGrantRole.expectations, expectation) return expectation @@ -8263,7 +7702,6 @@ func (mmGetGrantRole *mClientMockGetGrantRole) Times(n uint64) *mClientMockGetGr mmGetGrantRole.mock.t.Fatalf("Times of ClientMock.GetGrantRole mock can not be zero") } mm_atomic.StoreUint64(&mmGetGrantRole.expectedInvocations, n) - mmGetGrantRole.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetGrantRole } @@ -8283,8 +7721,6 @@ func (mmGetGrantRole *ClientMock) GetGrantRole(ctx context.Context, serviceID st mm_atomic.AddUint64(&mmGetGrantRole.beforeGetGrantRoleCounter, 1) defer mm_atomic.AddUint64(&mmGetGrantRole.afterGetGrantRoleCounter, 1) - mmGetGrantRole.t.Helper() - if mmGetGrantRole.inspectFuncGetGrantRole != nil { mmGetGrantRole.inspectFuncGetGrantRole(ctx, serviceID, grantedRoleName, granteeUserName, granteeRoleName) } @@ -8313,33 +7749,27 @@ func (mmGetGrantRole *ClientMock) GetGrantRole(ctx context.Context, serviceID st if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantRole.GetGrantRoleMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantRole.GetGrantRoleMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.grantedRoleName != nil && !minimock.Equal(*mm_want_ptrs.grantedRoleName, mm_got.grantedRoleName) { - mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameter grantedRoleName, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantRole.GetGrantRoleMock.defaultExpectation.expectationOrigins.originGrantedRoleName, *mm_want_ptrs.grantedRoleName, mm_got.grantedRoleName, minimock.Diff(*mm_want_ptrs.grantedRoleName, mm_got.grantedRoleName)) + mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameter grantedRoleName, want: %#v, got: %#v%s\n", *mm_want_ptrs.grantedRoleName, mm_got.grantedRoleName, minimock.Diff(*mm_want_ptrs.grantedRoleName, mm_got.grantedRoleName)) } if mm_want_ptrs.granteeUserName != nil && !minimock.Equal(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName) { - mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameter granteeUserName, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantRole.GetGrantRoleMock.defaultExpectation.expectationOrigins.originGranteeUserName, *mm_want_ptrs.granteeUserName, mm_got.granteeUserName, minimock.Diff(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName)) + mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameter granteeUserName, want: %#v, got: %#v%s\n", *mm_want_ptrs.granteeUserName, mm_got.granteeUserName, minimock.Diff(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName)) } if mm_want_ptrs.granteeRoleName != nil && !minimock.Equal(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName) { - mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameter granteeRoleName, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantRole.GetGrantRoleMock.defaultExpectation.expectationOrigins.originGranteeRoleName, *mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName, minimock.Diff(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName)) + mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameter granteeRoleName, want: %#v, got: %#v%s\n", *mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName, minimock.Diff(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetGrantRole.GetGrantRoleMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetGrantRole.t.Errorf("ClientMock.GetGrantRole got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetGrantRole.GetGrantRoleMock.defaultExpectation.results @@ -8399,7 +7829,7 @@ func (m *ClientMock) MinimockGetGrantRoleDone() bool { func (m *ClientMock) MinimockGetGrantRoleInspect() { for _, e := range m.GetGrantRoleMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetGrantRole at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetGrantRole with params: %#v", *e.params) } } @@ -8407,19 +7837,19 @@ func (m *ClientMock) MinimockGetGrantRoleInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetGrantRoleMock.defaultExpectation != nil && afterGetGrantRoleCounter < 1 { if m.GetGrantRoleMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetGrantRole at\n%s", m.GetGrantRoleMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetGrantRole") } else { - m.t.Errorf("Expected call to ClientMock.GetGrantRole at\n%s with params: %#v", m.GetGrantRoleMock.defaultExpectation.expectationOrigins.origin, *m.GetGrantRoleMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetGrantRole with params: %#v", *m.GetGrantRoleMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetGrantRole != nil && afterGetGrantRoleCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetGrantRole at\n%s", m.funcGetGrantRoleOrigin) + m.t.Error("Expected call to ClientMock.GetGrantRole") } if !m.GetGrantRoleMock.invocationsDone() && afterGetGrantRoleCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetGrantRole at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetGrantRoleMock.expectedInvocations), m.GetGrantRoleMock.expectedInvocationsOrigin, afterGetGrantRoleCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetGrantRole but found %d calls", + mm_atomic.LoadUint64(&m.GetGrantRoleMock.expectedInvocations), afterGetGrantRoleCounter) } } @@ -8432,19 +7862,16 @@ type mClientMockGetOrgPrivateEndpointConfig struct { callArgs []*ClientMockGetOrgPrivateEndpointConfigParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetOrgPrivateEndpointConfigExpectation specifies expectation struct of the Client.GetOrgPrivateEndpointConfig type ClientMockGetOrgPrivateEndpointConfigExpectation struct { - mock *ClientMock - params *ClientMockGetOrgPrivateEndpointConfigParams - paramPtrs *ClientMockGetOrgPrivateEndpointConfigParamPtrs - expectationOrigins ClientMockGetOrgPrivateEndpointConfigExpectationOrigins - results *ClientMockGetOrgPrivateEndpointConfigResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetOrgPrivateEndpointConfigParams + paramPtrs *ClientMockGetOrgPrivateEndpointConfigParamPtrs + results *ClientMockGetOrgPrivateEndpointConfigResults + Counter uint64 } // ClientMockGetOrgPrivateEndpointConfigParams contains parameters of the Client.GetOrgPrivateEndpointConfig @@ -8467,14 +7894,6 @@ type ClientMockGetOrgPrivateEndpointConfigResults struct { err error } -// ClientMockGetOrgPrivateEndpointConfigOrigins contains origins of expectations of the Client.GetOrgPrivateEndpointConfig -type ClientMockGetOrgPrivateEndpointConfigExpectationOrigins struct { - origin string - originCtx string - originCloudProvider string - originRegion string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -8500,7 +7919,6 @@ func (mmGetOrgPrivateEndpointConfig *mClientMockGetOrgPrivateEndpointConfig) Exp } mmGetOrgPrivateEndpointConfig.defaultExpectation.params = &ClientMockGetOrgPrivateEndpointConfigParams{ctx, cloudProvider, region} - mmGetOrgPrivateEndpointConfig.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetOrgPrivateEndpointConfig.expectations { if minimock.Equal(e.params, mmGetOrgPrivateEndpointConfig.defaultExpectation.params) { mmGetOrgPrivateEndpointConfig.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetOrgPrivateEndpointConfig.defaultExpectation.params) @@ -8528,7 +7946,6 @@ func (mmGetOrgPrivateEndpointConfig *mClientMockGetOrgPrivateEndpointConfig) Exp mmGetOrgPrivateEndpointConfig.defaultExpectation.paramPtrs = &ClientMockGetOrgPrivateEndpointConfigParamPtrs{} } mmGetOrgPrivateEndpointConfig.defaultExpectation.paramPtrs.ctx = &ctx - mmGetOrgPrivateEndpointConfig.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetOrgPrivateEndpointConfig } @@ -8551,7 +7968,6 @@ func (mmGetOrgPrivateEndpointConfig *mClientMockGetOrgPrivateEndpointConfig) Exp mmGetOrgPrivateEndpointConfig.defaultExpectation.paramPtrs = &ClientMockGetOrgPrivateEndpointConfigParamPtrs{} } mmGetOrgPrivateEndpointConfig.defaultExpectation.paramPtrs.cloudProvider = &cloudProvider - mmGetOrgPrivateEndpointConfig.defaultExpectation.expectationOrigins.originCloudProvider = minimock.CallerInfo(1) return mmGetOrgPrivateEndpointConfig } @@ -8574,7 +7990,6 @@ func (mmGetOrgPrivateEndpointConfig *mClientMockGetOrgPrivateEndpointConfig) Exp mmGetOrgPrivateEndpointConfig.defaultExpectation.paramPtrs = &ClientMockGetOrgPrivateEndpointConfigParamPtrs{} } mmGetOrgPrivateEndpointConfig.defaultExpectation.paramPtrs.region = ®ion - mmGetOrgPrivateEndpointConfig.defaultExpectation.expectationOrigins.originRegion = minimock.CallerInfo(1) return mmGetOrgPrivateEndpointConfig } @@ -8600,7 +8015,6 @@ func (mmGetOrgPrivateEndpointConfig *mClientMockGetOrgPrivateEndpointConfig) Ret mmGetOrgPrivateEndpointConfig.defaultExpectation = &ClientMockGetOrgPrivateEndpointConfigExpectation{mock: mmGetOrgPrivateEndpointConfig.mock} } mmGetOrgPrivateEndpointConfig.defaultExpectation.results = &ClientMockGetOrgPrivateEndpointConfigResults{op1, err} - mmGetOrgPrivateEndpointConfig.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetOrgPrivateEndpointConfig.mock } @@ -8615,7 +8029,6 @@ func (mmGetOrgPrivateEndpointConfig *mClientMockGetOrgPrivateEndpointConfig) Set } mmGetOrgPrivateEndpointConfig.mock.funcGetOrgPrivateEndpointConfig = f - mmGetOrgPrivateEndpointConfig.mock.funcGetOrgPrivateEndpointConfigOrigin = minimock.CallerInfo(1) return mmGetOrgPrivateEndpointConfig.mock } @@ -8627,9 +8040,8 @@ func (mmGetOrgPrivateEndpointConfig *mClientMockGetOrgPrivateEndpointConfig) Whe } expectation := &ClientMockGetOrgPrivateEndpointConfigExpectation{ - mock: mmGetOrgPrivateEndpointConfig.mock, - params: &ClientMockGetOrgPrivateEndpointConfigParams{ctx, cloudProvider, region}, - expectationOrigins: ClientMockGetOrgPrivateEndpointConfigExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetOrgPrivateEndpointConfig.mock, + params: &ClientMockGetOrgPrivateEndpointConfigParams{ctx, cloudProvider, region}, } mmGetOrgPrivateEndpointConfig.expectations = append(mmGetOrgPrivateEndpointConfig.expectations, expectation) return expectation @@ -8647,7 +8059,6 @@ func (mmGetOrgPrivateEndpointConfig *mClientMockGetOrgPrivateEndpointConfig) Tim mmGetOrgPrivateEndpointConfig.mock.t.Fatalf("Times of ClientMock.GetOrgPrivateEndpointConfig mock can not be zero") } mm_atomic.StoreUint64(&mmGetOrgPrivateEndpointConfig.expectedInvocations, n) - mmGetOrgPrivateEndpointConfig.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetOrgPrivateEndpointConfig } @@ -8667,8 +8078,6 @@ func (mmGetOrgPrivateEndpointConfig *ClientMock) GetOrgPrivateEndpointConfig(ctx mm_atomic.AddUint64(&mmGetOrgPrivateEndpointConfig.beforeGetOrgPrivateEndpointConfigCounter, 1) defer mm_atomic.AddUint64(&mmGetOrgPrivateEndpointConfig.afterGetOrgPrivateEndpointConfigCounter, 1) - mmGetOrgPrivateEndpointConfig.t.Helper() - if mmGetOrgPrivateEndpointConfig.inspectFuncGetOrgPrivateEndpointConfig != nil { mmGetOrgPrivateEndpointConfig.inspectFuncGetOrgPrivateEndpointConfig(ctx, cloudProvider, region) } @@ -8697,23 +8106,19 @@ func (mmGetOrgPrivateEndpointConfig *ClientMock) GetOrgPrivateEndpointConfig(ctx if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetOrgPrivateEndpointConfig.t.Errorf("ClientMock.GetOrgPrivateEndpointConfig got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetOrgPrivateEndpointConfig.GetOrgPrivateEndpointConfigMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetOrgPrivateEndpointConfig.t.Errorf("ClientMock.GetOrgPrivateEndpointConfig got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.cloudProvider != nil && !minimock.Equal(*mm_want_ptrs.cloudProvider, mm_got.cloudProvider) { - mmGetOrgPrivateEndpointConfig.t.Errorf("ClientMock.GetOrgPrivateEndpointConfig got unexpected parameter cloudProvider, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetOrgPrivateEndpointConfig.GetOrgPrivateEndpointConfigMock.defaultExpectation.expectationOrigins.originCloudProvider, *mm_want_ptrs.cloudProvider, mm_got.cloudProvider, minimock.Diff(*mm_want_ptrs.cloudProvider, mm_got.cloudProvider)) + mmGetOrgPrivateEndpointConfig.t.Errorf("ClientMock.GetOrgPrivateEndpointConfig got unexpected parameter cloudProvider, want: %#v, got: %#v%s\n", *mm_want_ptrs.cloudProvider, mm_got.cloudProvider, minimock.Diff(*mm_want_ptrs.cloudProvider, mm_got.cloudProvider)) } if mm_want_ptrs.region != nil && !minimock.Equal(*mm_want_ptrs.region, mm_got.region) { - mmGetOrgPrivateEndpointConfig.t.Errorf("ClientMock.GetOrgPrivateEndpointConfig got unexpected parameter region, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetOrgPrivateEndpointConfig.GetOrgPrivateEndpointConfigMock.defaultExpectation.expectationOrigins.originRegion, *mm_want_ptrs.region, mm_got.region, minimock.Diff(*mm_want_ptrs.region, mm_got.region)) + mmGetOrgPrivateEndpointConfig.t.Errorf("ClientMock.GetOrgPrivateEndpointConfig got unexpected parameter region, want: %#v, got: %#v%s\n", *mm_want_ptrs.region, mm_got.region, minimock.Diff(*mm_want_ptrs.region, mm_got.region)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetOrgPrivateEndpointConfig.t.Errorf("ClientMock.GetOrgPrivateEndpointConfig got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetOrgPrivateEndpointConfig.GetOrgPrivateEndpointConfigMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetOrgPrivateEndpointConfig.t.Errorf("ClientMock.GetOrgPrivateEndpointConfig got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetOrgPrivateEndpointConfig.GetOrgPrivateEndpointConfigMock.defaultExpectation.results @@ -8773,7 +8178,7 @@ func (m *ClientMock) MinimockGetOrgPrivateEndpointConfigDone() bool { func (m *ClientMock) MinimockGetOrgPrivateEndpointConfigInspect() { for _, e := range m.GetOrgPrivateEndpointConfigMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetOrgPrivateEndpointConfig at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetOrgPrivateEndpointConfig with params: %#v", *e.params) } } @@ -8781,19 +8186,19 @@ func (m *ClientMock) MinimockGetOrgPrivateEndpointConfigInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetOrgPrivateEndpointConfigMock.defaultExpectation != nil && afterGetOrgPrivateEndpointConfigCounter < 1 { if m.GetOrgPrivateEndpointConfigMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetOrgPrivateEndpointConfig at\n%s", m.GetOrgPrivateEndpointConfigMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetOrgPrivateEndpointConfig") } else { - m.t.Errorf("Expected call to ClientMock.GetOrgPrivateEndpointConfig at\n%s with params: %#v", m.GetOrgPrivateEndpointConfigMock.defaultExpectation.expectationOrigins.origin, *m.GetOrgPrivateEndpointConfigMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetOrgPrivateEndpointConfig with params: %#v", *m.GetOrgPrivateEndpointConfigMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetOrgPrivateEndpointConfig != nil && afterGetOrgPrivateEndpointConfigCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetOrgPrivateEndpointConfig at\n%s", m.funcGetOrgPrivateEndpointConfigOrigin) + m.t.Error("Expected call to ClientMock.GetOrgPrivateEndpointConfig") } if !m.GetOrgPrivateEndpointConfigMock.invocationsDone() && afterGetOrgPrivateEndpointConfigCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetOrgPrivateEndpointConfig at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetOrgPrivateEndpointConfigMock.expectedInvocations), m.GetOrgPrivateEndpointConfigMock.expectedInvocationsOrigin, afterGetOrgPrivateEndpointConfigCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetOrgPrivateEndpointConfig but found %d calls", + mm_atomic.LoadUint64(&m.GetOrgPrivateEndpointConfigMock.expectedInvocations), afterGetOrgPrivateEndpointConfigCounter) } } @@ -8806,19 +8211,16 @@ type mClientMockGetOrganizationPrivateEndpoints struct { callArgs []*ClientMockGetOrganizationPrivateEndpointsParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetOrganizationPrivateEndpointsExpectation specifies expectation struct of the Client.GetOrganizationPrivateEndpoints type ClientMockGetOrganizationPrivateEndpointsExpectation struct { - mock *ClientMock - params *ClientMockGetOrganizationPrivateEndpointsParams - paramPtrs *ClientMockGetOrganizationPrivateEndpointsParamPtrs - expectationOrigins ClientMockGetOrganizationPrivateEndpointsExpectationOrigins - results *ClientMockGetOrganizationPrivateEndpointsResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetOrganizationPrivateEndpointsParams + paramPtrs *ClientMockGetOrganizationPrivateEndpointsParamPtrs + results *ClientMockGetOrganizationPrivateEndpointsResults + Counter uint64 } // ClientMockGetOrganizationPrivateEndpointsParams contains parameters of the Client.GetOrganizationPrivateEndpoints @@ -8837,12 +8239,6 @@ type ClientMockGetOrganizationPrivateEndpointsResults struct { err error } -// ClientMockGetOrganizationPrivateEndpointsOrigins contains origins of expectations of the Client.GetOrganizationPrivateEndpoints -type ClientMockGetOrganizationPrivateEndpointsExpectationOrigins struct { - origin string - originCtx string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -8868,7 +8264,6 @@ func (mmGetOrganizationPrivateEndpoints *mClientMockGetOrganizationPrivateEndpoi } mmGetOrganizationPrivateEndpoints.defaultExpectation.params = &ClientMockGetOrganizationPrivateEndpointsParams{ctx} - mmGetOrganizationPrivateEndpoints.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetOrganizationPrivateEndpoints.expectations { if minimock.Equal(e.params, mmGetOrganizationPrivateEndpoints.defaultExpectation.params) { mmGetOrganizationPrivateEndpoints.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetOrganizationPrivateEndpoints.defaultExpectation.params) @@ -8896,7 +8291,6 @@ func (mmGetOrganizationPrivateEndpoints *mClientMockGetOrganizationPrivateEndpoi mmGetOrganizationPrivateEndpoints.defaultExpectation.paramPtrs = &ClientMockGetOrganizationPrivateEndpointsParamPtrs{} } mmGetOrganizationPrivateEndpoints.defaultExpectation.paramPtrs.ctx = &ctx - mmGetOrganizationPrivateEndpoints.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetOrganizationPrivateEndpoints } @@ -8922,7 +8316,6 @@ func (mmGetOrganizationPrivateEndpoints *mClientMockGetOrganizationPrivateEndpoi mmGetOrganizationPrivateEndpoints.defaultExpectation = &ClientMockGetOrganizationPrivateEndpointsExpectation{mock: mmGetOrganizationPrivateEndpoints.mock} } mmGetOrganizationPrivateEndpoints.defaultExpectation.results = &ClientMockGetOrganizationPrivateEndpointsResults{pap1, err} - mmGetOrganizationPrivateEndpoints.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetOrganizationPrivateEndpoints.mock } @@ -8937,7 +8330,6 @@ func (mmGetOrganizationPrivateEndpoints *mClientMockGetOrganizationPrivateEndpoi } mmGetOrganizationPrivateEndpoints.mock.funcGetOrganizationPrivateEndpoints = f - mmGetOrganizationPrivateEndpoints.mock.funcGetOrganizationPrivateEndpointsOrigin = minimock.CallerInfo(1) return mmGetOrganizationPrivateEndpoints.mock } @@ -8949,9 +8341,8 @@ func (mmGetOrganizationPrivateEndpoints *mClientMockGetOrganizationPrivateEndpoi } expectation := &ClientMockGetOrganizationPrivateEndpointsExpectation{ - mock: mmGetOrganizationPrivateEndpoints.mock, - params: &ClientMockGetOrganizationPrivateEndpointsParams{ctx}, - expectationOrigins: ClientMockGetOrganizationPrivateEndpointsExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetOrganizationPrivateEndpoints.mock, + params: &ClientMockGetOrganizationPrivateEndpointsParams{ctx}, } mmGetOrganizationPrivateEndpoints.expectations = append(mmGetOrganizationPrivateEndpoints.expectations, expectation) return expectation @@ -8969,7 +8360,6 @@ func (mmGetOrganizationPrivateEndpoints *mClientMockGetOrganizationPrivateEndpoi mmGetOrganizationPrivateEndpoints.mock.t.Fatalf("Times of ClientMock.GetOrganizationPrivateEndpoints mock can not be zero") } mm_atomic.StoreUint64(&mmGetOrganizationPrivateEndpoints.expectedInvocations, n) - mmGetOrganizationPrivateEndpoints.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetOrganizationPrivateEndpoints } @@ -8989,8 +8379,6 @@ func (mmGetOrganizationPrivateEndpoints *ClientMock) GetOrganizationPrivateEndpo mm_atomic.AddUint64(&mmGetOrganizationPrivateEndpoints.beforeGetOrganizationPrivateEndpointsCounter, 1) defer mm_atomic.AddUint64(&mmGetOrganizationPrivateEndpoints.afterGetOrganizationPrivateEndpointsCounter, 1) - mmGetOrganizationPrivateEndpoints.t.Helper() - if mmGetOrganizationPrivateEndpoints.inspectFuncGetOrganizationPrivateEndpoints != nil { mmGetOrganizationPrivateEndpoints.inspectFuncGetOrganizationPrivateEndpoints(ctx) } @@ -9019,13 +8407,11 @@ func (mmGetOrganizationPrivateEndpoints *ClientMock) GetOrganizationPrivateEndpo if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetOrganizationPrivateEndpoints.t.Errorf("ClientMock.GetOrganizationPrivateEndpoints got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetOrganizationPrivateEndpoints.GetOrganizationPrivateEndpointsMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetOrganizationPrivateEndpoints.t.Errorf("ClientMock.GetOrganizationPrivateEndpoints got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetOrganizationPrivateEndpoints.t.Errorf("ClientMock.GetOrganizationPrivateEndpoints got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetOrganizationPrivateEndpoints.GetOrganizationPrivateEndpointsMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetOrganizationPrivateEndpoints.t.Errorf("ClientMock.GetOrganizationPrivateEndpoints got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetOrganizationPrivateEndpoints.GetOrganizationPrivateEndpointsMock.defaultExpectation.results @@ -9085,7 +8471,7 @@ func (m *ClientMock) MinimockGetOrganizationPrivateEndpointsDone() bool { func (m *ClientMock) MinimockGetOrganizationPrivateEndpointsInspect() { for _, e := range m.GetOrganizationPrivateEndpointsMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetOrganizationPrivateEndpoints at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetOrganizationPrivateEndpoints with params: %#v", *e.params) } } @@ -9093,19 +8479,19 @@ func (m *ClientMock) MinimockGetOrganizationPrivateEndpointsInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetOrganizationPrivateEndpointsMock.defaultExpectation != nil && afterGetOrganizationPrivateEndpointsCounter < 1 { if m.GetOrganizationPrivateEndpointsMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetOrganizationPrivateEndpoints at\n%s", m.GetOrganizationPrivateEndpointsMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetOrganizationPrivateEndpoints") } else { - m.t.Errorf("Expected call to ClientMock.GetOrganizationPrivateEndpoints at\n%s with params: %#v", m.GetOrganizationPrivateEndpointsMock.defaultExpectation.expectationOrigins.origin, *m.GetOrganizationPrivateEndpointsMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetOrganizationPrivateEndpoints with params: %#v", *m.GetOrganizationPrivateEndpointsMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetOrganizationPrivateEndpoints != nil && afterGetOrganizationPrivateEndpointsCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetOrganizationPrivateEndpoints at\n%s", m.funcGetOrganizationPrivateEndpointsOrigin) + m.t.Error("Expected call to ClientMock.GetOrganizationPrivateEndpoints") } if !m.GetOrganizationPrivateEndpointsMock.invocationsDone() && afterGetOrganizationPrivateEndpointsCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetOrganizationPrivateEndpoints at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetOrganizationPrivateEndpointsMock.expectedInvocations), m.GetOrganizationPrivateEndpointsMock.expectedInvocationsOrigin, afterGetOrganizationPrivateEndpointsCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetOrganizationPrivateEndpoints but found %d calls", + mm_atomic.LoadUint64(&m.GetOrganizationPrivateEndpointsMock.expectedInvocations), afterGetOrganizationPrivateEndpointsCounter) } } @@ -9118,19 +8504,16 @@ type mClientMockGetQueryEndpoint struct { callArgs []*ClientMockGetQueryEndpointParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetQueryEndpointExpectation specifies expectation struct of the Client.GetQueryEndpoint type ClientMockGetQueryEndpointExpectation struct { - mock *ClientMock - params *ClientMockGetQueryEndpointParams - paramPtrs *ClientMockGetQueryEndpointParamPtrs - expectationOrigins ClientMockGetQueryEndpointExpectationOrigins - results *ClientMockGetQueryEndpointResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetQueryEndpointParams + paramPtrs *ClientMockGetQueryEndpointParamPtrs + results *ClientMockGetQueryEndpointResults + Counter uint64 } // ClientMockGetQueryEndpointParams contains parameters of the Client.GetQueryEndpoint @@ -9151,13 +8534,6 @@ type ClientMockGetQueryEndpointResults struct { err error } -// ClientMockGetQueryEndpointOrigins contains origins of expectations of the Client.GetQueryEndpoint -type ClientMockGetQueryEndpointExpectationOrigins struct { - origin string - originCtx string - originServiceID string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -9183,7 +8559,6 @@ func (mmGetQueryEndpoint *mClientMockGetQueryEndpoint) Expect(ctx context.Contex } mmGetQueryEndpoint.defaultExpectation.params = &ClientMockGetQueryEndpointParams{ctx, serviceID} - mmGetQueryEndpoint.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetQueryEndpoint.expectations { if minimock.Equal(e.params, mmGetQueryEndpoint.defaultExpectation.params) { mmGetQueryEndpoint.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetQueryEndpoint.defaultExpectation.params) @@ -9211,7 +8586,6 @@ func (mmGetQueryEndpoint *mClientMockGetQueryEndpoint) ExpectCtxParam1(ctx conte mmGetQueryEndpoint.defaultExpectation.paramPtrs = &ClientMockGetQueryEndpointParamPtrs{} } mmGetQueryEndpoint.defaultExpectation.paramPtrs.ctx = &ctx - mmGetQueryEndpoint.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetQueryEndpoint } @@ -9234,7 +8608,6 @@ func (mmGetQueryEndpoint *mClientMockGetQueryEndpoint) ExpectServiceIDParam2(ser mmGetQueryEndpoint.defaultExpectation.paramPtrs = &ClientMockGetQueryEndpointParamPtrs{} } mmGetQueryEndpoint.defaultExpectation.paramPtrs.serviceID = &serviceID - mmGetQueryEndpoint.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmGetQueryEndpoint } @@ -9260,7 +8633,6 @@ func (mmGetQueryEndpoint *mClientMockGetQueryEndpoint) Return(sp1 *ServiceQueryE mmGetQueryEndpoint.defaultExpectation = &ClientMockGetQueryEndpointExpectation{mock: mmGetQueryEndpoint.mock} } mmGetQueryEndpoint.defaultExpectation.results = &ClientMockGetQueryEndpointResults{sp1, err} - mmGetQueryEndpoint.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetQueryEndpoint.mock } @@ -9275,7 +8647,6 @@ func (mmGetQueryEndpoint *mClientMockGetQueryEndpoint) Set(f func(ctx context.Co } mmGetQueryEndpoint.mock.funcGetQueryEndpoint = f - mmGetQueryEndpoint.mock.funcGetQueryEndpointOrigin = minimock.CallerInfo(1) return mmGetQueryEndpoint.mock } @@ -9287,9 +8658,8 @@ func (mmGetQueryEndpoint *mClientMockGetQueryEndpoint) When(ctx context.Context, } expectation := &ClientMockGetQueryEndpointExpectation{ - mock: mmGetQueryEndpoint.mock, - params: &ClientMockGetQueryEndpointParams{ctx, serviceID}, - expectationOrigins: ClientMockGetQueryEndpointExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetQueryEndpoint.mock, + params: &ClientMockGetQueryEndpointParams{ctx, serviceID}, } mmGetQueryEndpoint.expectations = append(mmGetQueryEndpoint.expectations, expectation) return expectation @@ -9307,7 +8677,6 @@ func (mmGetQueryEndpoint *mClientMockGetQueryEndpoint) Times(n uint64) *mClientM mmGetQueryEndpoint.mock.t.Fatalf("Times of ClientMock.GetQueryEndpoint mock can not be zero") } mm_atomic.StoreUint64(&mmGetQueryEndpoint.expectedInvocations, n) - mmGetQueryEndpoint.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetQueryEndpoint } @@ -9327,8 +8696,6 @@ func (mmGetQueryEndpoint *ClientMock) GetQueryEndpoint(ctx context.Context, serv mm_atomic.AddUint64(&mmGetQueryEndpoint.beforeGetQueryEndpointCounter, 1) defer mm_atomic.AddUint64(&mmGetQueryEndpoint.afterGetQueryEndpointCounter, 1) - mmGetQueryEndpoint.t.Helper() - if mmGetQueryEndpoint.inspectFuncGetQueryEndpoint != nil { mmGetQueryEndpoint.inspectFuncGetQueryEndpoint(ctx, serviceID) } @@ -9357,18 +8724,15 @@ func (mmGetQueryEndpoint *ClientMock) GetQueryEndpoint(ctx context.Context, serv if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetQueryEndpoint.t.Errorf("ClientMock.GetQueryEndpoint got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetQueryEndpoint.GetQueryEndpointMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetQueryEndpoint.t.Errorf("ClientMock.GetQueryEndpoint got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmGetQueryEndpoint.t.Errorf("ClientMock.GetQueryEndpoint got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetQueryEndpoint.GetQueryEndpointMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmGetQueryEndpoint.t.Errorf("ClientMock.GetQueryEndpoint got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetQueryEndpoint.t.Errorf("ClientMock.GetQueryEndpoint got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetQueryEndpoint.GetQueryEndpointMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetQueryEndpoint.t.Errorf("ClientMock.GetQueryEndpoint got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetQueryEndpoint.GetQueryEndpointMock.defaultExpectation.results @@ -9428,7 +8792,7 @@ func (m *ClientMock) MinimockGetQueryEndpointDone() bool { func (m *ClientMock) MinimockGetQueryEndpointInspect() { for _, e := range m.GetQueryEndpointMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetQueryEndpoint at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetQueryEndpoint with params: %#v", *e.params) } } @@ -9436,19 +8800,19 @@ func (m *ClientMock) MinimockGetQueryEndpointInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetQueryEndpointMock.defaultExpectation != nil && afterGetQueryEndpointCounter < 1 { if m.GetQueryEndpointMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetQueryEndpoint at\n%s", m.GetQueryEndpointMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetQueryEndpoint") } else { - m.t.Errorf("Expected call to ClientMock.GetQueryEndpoint at\n%s with params: %#v", m.GetQueryEndpointMock.defaultExpectation.expectationOrigins.origin, *m.GetQueryEndpointMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetQueryEndpoint with params: %#v", *m.GetQueryEndpointMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetQueryEndpoint != nil && afterGetQueryEndpointCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetQueryEndpoint at\n%s", m.funcGetQueryEndpointOrigin) + m.t.Error("Expected call to ClientMock.GetQueryEndpoint") } if !m.GetQueryEndpointMock.invocationsDone() && afterGetQueryEndpointCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetQueryEndpoint at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetQueryEndpointMock.expectedInvocations), m.GetQueryEndpointMock.expectedInvocationsOrigin, afterGetQueryEndpointCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetQueryEndpoint but found %d calls", + mm_atomic.LoadUint64(&m.GetQueryEndpointMock.expectedInvocations), afterGetQueryEndpointCounter) } } @@ -9461,19 +8825,16 @@ type mClientMockGetReversePrivateEndpoint struct { callArgs []*ClientMockGetReversePrivateEndpointParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetReversePrivateEndpointExpectation specifies expectation struct of the Client.GetReversePrivateEndpoint type ClientMockGetReversePrivateEndpointExpectation struct { - mock *ClientMock - params *ClientMockGetReversePrivateEndpointParams - paramPtrs *ClientMockGetReversePrivateEndpointParamPtrs - expectationOrigins ClientMockGetReversePrivateEndpointExpectationOrigins - results *ClientMockGetReversePrivateEndpointResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetReversePrivateEndpointParams + paramPtrs *ClientMockGetReversePrivateEndpointParamPtrs + results *ClientMockGetReversePrivateEndpointResults + Counter uint64 } // ClientMockGetReversePrivateEndpointParams contains parameters of the Client.GetReversePrivateEndpoint @@ -9496,14 +8857,6 @@ type ClientMockGetReversePrivateEndpointResults struct { err error } -// ClientMockGetReversePrivateEndpointOrigins contains origins of expectations of the Client.GetReversePrivateEndpoint -type ClientMockGetReversePrivateEndpointExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originReversePrivateEndpointId string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -9529,7 +8882,6 @@ func (mmGetReversePrivateEndpoint *mClientMockGetReversePrivateEndpoint) Expect( } mmGetReversePrivateEndpoint.defaultExpectation.params = &ClientMockGetReversePrivateEndpointParams{ctx, serviceId, reversePrivateEndpointId} - mmGetReversePrivateEndpoint.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetReversePrivateEndpoint.expectations { if minimock.Equal(e.params, mmGetReversePrivateEndpoint.defaultExpectation.params) { mmGetReversePrivateEndpoint.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetReversePrivateEndpoint.defaultExpectation.params) @@ -9557,7 +8909,6 @@ func (mmGetReversePrivateEndpoint *mClientMockGetReversePrivateEndpoint) ExpectC mmGetReversePrivateEndpoint.defaultExpectation.paramPtrs = &ClientMockGetReversePrivateEndpointParamPtrs{} } mmGetReversePrivateEndpoint.defaultExpectation.paramPtrs.ctx = &ctx - mmGetReversePrivateEndpoint.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetReversePrivateEndpoint } @@ -9580,7 +8931,6 @@ func (mmGetReversePrivateEndpoint *mClientMockGetReversePrivateEndpoint) ExpectS mmGetReversePrivateEndpoint.defaultExpectation.paramPtrs = &ClientMockGetReversePrivateEndpointParamPtrs{} } mmGetReversePrivateEndpoint.defaultExpectation.paramPtrs.serviceId = &serviceId - mmGetReversePrivateEndpoint.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmGetReversePrivateEndpoint } @@ -9603,7 +8953,6 @@ func (mmGetReversePrivateEndpoint *mClientMockGetReversePrivateEndpoint) ExpectR mmGetReversePrivateEndpoint.defaultExpectation.paramPtrs = &ClientMockGetReversePrivateEndpointParamPtrs{} } mmGetReversePrivateEndpoint.defaultExpectation.paramPtrs.reversePrivateEndpointId = &reversePrivateEndpointId - mmGetReversePrivateEndpoint.defaultExpectation.expectationOrigins.originReversePrivateEndpointId = minimock.CallerInfo(1) return mmGetReversePrivateEndpoint } @@ -9629,7 +8978,6 @@ func (mmGetReversePrivateEndpoint *mClientMockGetReversePrivateEndpoint) Return( mmGetReversePrivateEndpoint.defaultExpectation = &ClientMockGetReversePrivateEndpointExpectation{mock: mmGetReversePrivateEndpoint.mock} } mmGetReversePrivateEndpoint.defaultExpectation.results = &ClientMockGetReversePrivateEndpointResults{rp1, err} - mmGetReversePrivateEndpoint.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetReversePrivateEndpoint.mock } @@ -9644,7 +8992,6 @@ func (mmGetReversePrivateEndpoint *mClientMockGetReversePrivateEndpoint) Set(f f } mmGetReversePrivateEndpoint.mock.funcGetReversePrivateEndpoint = f - mmGetReversePrivateEndpoint.mock.funcGetReversePrivateEndpointOrigin = minimock.CallerInfo(1) return mmGetReversePrivateEndpoint.mock } @@ -9656,9 +9003,8 @@ func (mmGetReversePrivateEndpoint *mClientMockGetReversePrivateEndpoint) When(ct } expectation := &ClientMockGetReversePrivateEndpointExpectation{ - mock: mmGetReversePrivateEndpoint.mock, - params: &ClientMockGetReversePrivateEndpointParams{ctx, serviceId, reversePrivateEndpointId}, - expectationOrigins: ClientMockGetReversePrivateEndpointExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetReversePrivateEndpoint.mock, + params: &ClientMockGetReversePrivateEndpointParams{ctx, serviceId, reversePrivateEndpointId}, } mmGetReversePrivateEndpoint.expectations = append(mmGetReversePrivateEndpoint.expectations, expectation) return expectation @@ -9676,7 +9022,6 @@ func (mmGetReversePrivateEndpoint *mClientMockGetReversePrivateEndpoint) Times(n mmGetReversePrivateEndpoint.mock.t.Fatalf("Times of ClientMock.GetReversePrivateEndpoint mock can not be zero") } mm_atomic.StoreUint64(&mmGetReversePrivateEndpoint.expectedInvocations, n) - mmGetReversePrivateEndpoint.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetReversePrivateEndpoint } @@ -9696,8 +9041,6 @@ func (mmGetReversePrivateEndpoint *ClientMock) GetReversePrivateEndpoint(ctx con mm_atomic.AddUint64(&mmGetReversePrivateEndpoint.beforeGetReversePrivateEndpointCounter, 1) defer mm_atomic.AddUint64(&mmGetReversePrivateEndpoint.afterGetReversePrivateEndpointCounter, 1) - mmGetReversePrivateEndpoint.t.Helper() - if mmGetReversePrivateEndpoint.inspectFuncGetReversePrivateEndpoint != nil { mmGetReversePrivateEndpoint.inspectFuncGetReversePrivateEndpoint(ctx, serviceId, reversePrivateEndpointId) } @@ -9726,23 +9069,19 @@ func (mmGetReversePrivateEndpoint *ClientMock) GetReversePrivateEndpoint(ctx con if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetReversePrivateEndpoint.t.Errorf("ClientMock.GetReversePrivateEndpoint got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetReversePrivateEndpoint.GetReversePrivateEndpointMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetReversePrivateEndpoint.t.Errorf("ClientMock.GetReversePrivateEndpoint got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmGetReversePrivateEndpoint.t.Errorf("ClientMock.GetReversePrivateEndpoint got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetReversePrivateEndpoint.GetReversePrivateEndpointMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmGetReversePrivateEndpoint.t.Errorf("ClientMock.GetReversePrivateEndpoint got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.reversePrivateEndpointId != nil && !minimock.Equal(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId) { - mmGetReversePrivateEndpoint.t.Errorf("ClientMock.GetReversePrivateEndpoint got unexpected parameter reversePrivateEndpointId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetReversePrivateEndpoint.GetReversePrivateEndpointMock.defaultExpectation.expectationOrigins.originReversePrivateEndpointId, *mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId, minimock.Diff(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId)) + mmGetReversePrivateEndpoint.t.Errorf("ClientMock.GetReversePrivateEndpoint got unexpected parameter reversePrivateEndpointId, want: %#v, got: %#v%s\n", *mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId, minimock.Diff(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetReversePrivateEndpoint.t.Errorf("ClientMock.GetReversePrivateEndpoint got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetReversePrivateEndpoint.GetReversePrivateEndpointMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetReversePrivateEndpoint.t.Errorf("ClientMock.GetReversePrivateEndpoint got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetReversePrivateEndpoint.GetReversePrivateEndpointMock.defaultExpectation.results @@ -9802,7 +9141,7 @@ func (m *ClientMock) MinimockGetReversePrivateEndpointDone() bool { func (m *ClientMock) MinimockGetReversePrivateEndpointInspect() { for _, e := range m.GetReversePrivateEndpointMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpoint at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpoint with params: %#v", *e.params) } } @@ -9810,19 +9149,19 @@ func (m *ClientMock) MinimockGetReversePrivateEndpointInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetReversePrivateEndpointMock.defaultExpectation != nil && afterGetReversePrivateEndpointCounter < 1 { if m.GetReversePrivateEndpointMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpoint at\n%s", m.GetReversePrivateEndpointMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetReversePrivateEndpoint") } else { - m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpoint at\n%s with params: %#v", m.GetReversePrivateEndpointMock.defaultExpectation.expectationOrigins.origin, *m.GetReversePrivateEndpointMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpoint with params: %#v", *m.GetReversePrivateEndpointMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetReversePrivateEndpoint != nil && afterGetReversePrivateEndpointCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpoint at\n%s", m.funcGetReversePrivateEndpointOrigin) + m.t.Error("Expected call to ClientMock.GetReversePrivateEndpoint") } if !m.GetReversePrivateEndpointMock.invocationsDone() && afterGetReversePrivateEndpointCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetReversePrivateEndpoint at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetReversePrivateEndpointMock.expectedInvocations), m.GetReversePrivateEndpointMock.expectedInvocationsOrigin, afterGetReversePrivateEndpointCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetReversePrivateEndpoint but found %d calls", + mm_atomic.LoadUint64(&m.GetReversePrivateEndpointMock.expectedInvocations), afterGetReversePrivateEndpointCounter) } } @@ -9835,19 +9174,16 @@ type mClientMockGetReversePrivateEndpointPath struct { callArgs []*ClientMockGetReversePrivateEndpointPathParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetReversePrivateEndpointPathExpectation specifies expectation struct of the Client.GetReversePrivateEndpointPath type ClientMockGetReversePrivateEndpointPathExpectation struct { - mock *ClientMock - params *ClientMockGetReversePrivateEndpointPathParams - paramPtrs *ClientMockGetReversePrivateEndpointPathParamPtrs - expectationOrigins ClientMockGetReversePrivateEndpointPathExpectationOrigins - results *ClientMockGetReversePrivateEndpointPathResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetReversePrivateEndpointPathParams + paramPtrs *ClientMockGetReversePrivateEndpointPathParamPtrs + results *ClientMockGetReversePrivateEndpointPathResults + Counter uint64 } // ClientMockGetReversePrivateEndpointPathParams contains parameters of the Client.GetReversePrivateEndpointPath @@ -9867,13 +9203,6 @@ type ClientMockGetReversePrivateEndpointPathResults struct { s1 string } -// ClientMockGetReversePrivateEndpointPathOrigins contains origins of expectations of the Client.GetReversePrivateEndpointPath -type ClientMockGetReversePrivateEndpointPathExpectationOrigins struct { - origin string - originServiceId string - originReversePrivateEndpointId string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -9899,7 +9228,6 @@ func (mmGetReversePrivateEndpointPath *mClientMockGetReversePrivateEndpointPath) } mmGetReversePrivateEndpointPath.defaultExpectation.params = &ClientMockGetReversePrivateEndpointPathParams{serviceId, reversePrivateEndpointId} - mmGetReversePrivateEndpointPath.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetReversePrivateEndpointPath.expectations { if minimock.Equal(e.params, mmGetReversePrivateEndpointPath.defaultExpectation.params) { mmGetReversePrivateEndpointPath.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetReversePrivateEndpointPath.defaultExpectation.params) @@ -9927,7 +9255,6 @@ func (mmGetReversePrivateEndpointPath *mClientMockGetReversePrivateEndpointPath) mmGetReversePrivateEndpointPath.defaultExpectation.paramPtrs = &ClientMockGetReversePrivateEndpointPathParamPtrs{} } mmGetReversePrivateEndpointPath.defaultExpectation.paramPtrs.serviceId = &serviceId - mmGetReversePrivateEndpointPath.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmGetReversePrivateEndpointPath } @@ -9950,7 +9277,6 @@ func (mmGetReversePrivateEndpointPath *mClientMockGetReversePrivateEndpointPath) mmGetReversePrivateEndpointPath.defaultExpectation.paramPtrs = &ClientMockGetReversePrivateEndpointPathParamPtrs{} } mmGetReversePrivateEndpointPath.defaultExpectation.paramPtrs.reversePrivateEndpointId = &reversePrivateEndpointId - mmGetReversePrivateEndpointPath.defaultExpectation.expectationOrigins.originReversePrivateEndpointId = minimock.CallerInfo(1) return mmGetReversePrivateEndpointPath } @@ -9976,7 +9302,6 @@ func (mmGetReversePrivateEndpointPath *mClientMockGetReversePrivateEndpointPath) mmGetReversePrivateEndpointPath.defaultExpectation = &ClientMockGetReversePrivateEndpointPathExpectation{mock: mmGetReversePrivateEndpointPath.mock} } mmGetReversePrivateEndpointPath.defaultExpectation.results = &ClientMockGetReversePrivateEndpointPathResults{s1} - mmGetReversePrivateEndpointPath.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetReversePrivateEndpointPath.mock } @@ -9991,7 +9316,6 @@ func (mmGetReversePrivateEndpointPath *mClientMockGetReversePrivateEndpointPath) } mmGetReversePrivateEndpointPath.mock.funcGetReversePrivateEndpointPath = f - mmGetReversePrivateEndpointPath.mock.funcGetReversePrivateEndpointPathOrigin = minimock.CallerInfo(1) return mmGetReversePrivateEndpointPath.mock } @@ -10003,9 +9327,8 @@ func (mmGetReversePrivateEndpointPath *mClientMockGetReversePrivateEndpointPath) } expectation := &ClientMockGetReversePrivateEndpointPathExpectation{ - mock: mmGetReversePrivateEndpointPath.mock, - params: &ClientMockGetReversePrivateEndpointPathParams{serviceId, reversePrivateEndpointId}, - expectationOrigins: ClientMockGetReversePrivateEndpointPathExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetReversePrivateEndpointPath.mock, + params: &ClientMockGetReversePrivateEndpointPathParams{serviceId, reversePrivateEndpointId}, } mmGetReversePrivateEndpointPath.expectations = append(mmGetReversePrivateEndpointPath.expectations, expectation) return expectation @@ -10023,7 +9346,6 @@ func (mmGetReversePrivateEndpointPath *mClientMockGetReversePrivateEndpointPath) mmGetReversePrivateEndpointPath.mock.t.Fatalf("Times of ClientMock.GetReversePrivateEndpointPath mock can not be zero") } mm_atomic.StoreUint64(&mmGetReversePrivateEndpointPath.expectedInvocations, n) - mmGetReversePrivateEndpointPath.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetReversePrivateEndpointPath } @@ -10043,8 +9365,6 @@ func (mmGetReversePrivateEndpointPath *ClientMock) GetReversePrivateEndpointPath mm_atomic.AddUint64(&mmGetReversePrivateEndpointPath.beforeGetReversePrivateEndpointPathCounter, 1) defer mm_atomic.AddUint64(&mmGetReversePrivateEndpointPath.afterGetReversePrivateEndpointPathCounter, 1) - mmGetReversePrivateEndpointPath.t.Helper() - if mmGetReversePrivateEndpointPath.inspectFuncGetReversePrivateEndpointPath != nil { mmGetReversePrivateEndpointPath.inspectFuncGetReversePrivateEndpointPath(serviceId, reversePrivateEndpointId) } @@ -10073,18 +9393,15 @@ func (mmGetReversePrivateEndpointPath *ClientMock) GetReversePrivateEndpointPath if mm_want_ptrs != nil { if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmGetReversePrivateEndpointPath.t.Errorf("ClientMock.GetReversePrivateEndpointPath got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetReversePrivateEndpointPath.GetReversePrivateEndpointPathMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmGetReversePrivateEndpointPath.t.Errorf("ClientMock.GetReversePrivateEndpointPath got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.reversePrivateEndpointId != nil && !minimock.Equal(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId) { - mmGetReversePrivateEndpointPath.t.Errorf("ClientMock.GetReversePrivateEndpointPath got unexpected parameter reversePrivateEndpointId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetReversePrivateEndpointPath.GetReversePrivateEndpointPathMock.defaultExpectation.expectationOrigins.originReversePrivateEndpointId, *mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId, minimock.Diff(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId)) + mmGetReversePrivateEndpointPath.t.Errorf("ClientMock.GetReversePrivateEndpointPath got unexpected parameter reversePrivateEndpointId, want: %#v, got: %#v%s\n", *mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId, minimock.Diff(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetReversePrivateEndpointPath.t.Errorf("ClientMock.GetReversePrivateEndpointPath got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetReversePrivateEndpointPath.GetReversePrivateEndpointPathMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetReversePrivateEndpointPath.t.Errorf("ClientMock.GetReversePrivateEndpointPath got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetReversePrivateEndpointPath.GetReversePrivateEndpointPathMock.defaultExpectation.results @@ -10144,7 +9461,7 @@ func (m *ClientMock) MinimockGetReversePrivateEndpointPathDone() bool { func (m *ClientMock) MinimockGetReversePrivateEndpointPathInspect() { for _, e := range m.GetReversePrivateEndpointPathMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpointPath at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpointPath with params: %#v", *e.params) } } @@ -10152,19 +9469,19 @@ func (m *ClientMock) MinimockGetReversePrivateEndpointPathInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetReversePrivateEndpointPathMock.defaultExpectation != nil && afterGetReversePrivateEndpointPathCounter < 1 { if m.GetReversePrivateEndpointPathMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpointPath at\n%s", m.GetReversePrivateEndpointPathMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetReversePrivateEndpointPath") } else { - m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpointPath at\n%s with params: %#v", m.GetReversePrivateEndpointPathMock.defaultExpectation.expectationOrigins.origin, *m.GetReversePrivateEndpointPathMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpointPath with params: %#v", *m.GetReversePrivateEndpointPathMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetReversePrivateEndpointPath != nil && afterGetReversePrivateEndpointPathCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetReversePrivateEndpointPath at\n%s", m.funcGetReversePrivateEndpointPathOrigin) + m.t.Error("Expected call to ClientMock.GetReversePrivateEndpointPath") } if !m.GetReversePrivateEndpointPathMock.invocationsDone() && afterGetReversePrivateEndpointPathCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetReversePrivateEndpointPath at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetReversePrivateEndpointPathMock.expectedInvocations), m.GetReversePrivateEndpointPathMock.expectedInvocationsOrigin, afterGetReversePrivateEndpointPathCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetReversePrivateEndpointPath but found %d calls", + mm_atomic.LoadUint64(&m.GetReversePrivateEndpointPathMock.expectedInvocations), afterGetReversePrivateEndpointPathCounter) } } @@ -10177,19 +9494,16 @@ type mClientMockGetRole struct { callArgs []*ClientMockGetRoleParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetRoleExpectation specifies expectation struct of the Client.GetRole type ClientMockGetRoleExpectation struct { - mock *ClientMock - params *ClientMockGetRoleParams - paramPtrs *ClientMockGetRoleParamPtrs - expectationOrigins ClientMockGetRoleExpectationOrigins - results *ClientMockGetRoleResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetRoleParams + paramPtrs *ClientMockGetRoleParamPtrs + results *ClientMockGetRoleResults + Counter uint64 } // ClientMockGetRoleParams contains parameters of the Client.GetRole @@ -10212,14 +9526,6 @@ type ClientMockGetRoleResults struct { err error } -// ClientMockGetRoleOrigins contains origins of expectations of the Client.GetRole -type ClientMockGetRoleExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originName string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -10245,7 +9551,6 @@ func (mmGetRole *mClientMockGetRole) Expect(ctx context.Context, serviceID strin } mmGetRole.defaultExpectation.params = &ClientMockGetRoleParams{ctx, serviceID, name} - mmGetRole.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetRole.expectations { if minimock.Equal(e.params, mmGetRole.defaultExpectation.params) { mmGetRole.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetRole.defaultExpectation.params) @@ -10273,7 +9578,6 @@ func (mmGetRole *mClientMockGetRole) ExpectCtxParam1(ctx context.Context) *mClie mmGetRole.defaultExpectation.paramPtrs = &ClientMockGetRoleParamPtrs{} } mmGetRole.defaultExpectation.paramPtrs.ctx = &ctx - mmGetRole.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetRole } @@ -10296,7 +9600,6 @@ func (mmGetRole *mClientMockGetRole) ExpectServiceIDParam2(serviceID string) *mC mmGetRole.defaultExpectation.paramPtrs = &ClientMockGetRoleParamPtrs{} } mmGetRole.defaultExpectation.paramPtrs.serviceID = &serviceID - mmGetRole.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmGetRole } @@ -10319,7 +9622,6 @@ func (mmGetRole *mClientMockGetRole) ExpectNameParam3(name string) *mClientMockG mmGetRole.defaultExpectation.paramPtrs = &ClientMockGetRoleParamPtrs{} } mmGetRole.defaultExpectation.paramPtrs.name = &name - mmGetRole.defaultExpectation.expectationOrigins.originName = minimock.CallerInfo(1) return mmGetRole } @@ -10345,7 +9647,6 @@ func (mmGetRole *mClientMockGetRole) Return(rp1 *Role, err error) *ClientMock { mmGetRole.defaultExpectation = &ClientMockGetRoleExpectation{mock: mmGetRole.mock} } mmGetRole.defaultExpectation.results = &ClientMockGetRoleResults{rp1, err} - mmGetRole.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetRole.mock } @@ -10360,7 +9661,6 @@ func (mmGetRole *mClientMockGetRole) Set(f func(ctx context.Context, serviceID s } mmGetRole.mock.funcGetRole = f - mmGetRole.mock.funcGetRoleOrigin = minimock.CallerInfo(1) return mmGetRole.mock } @@ -10372,9 +9672,8 @@ func (mmGetRole *mClientMockGetRole) When(ctx context.Context, serviceID string, } expectation := &ClientMockGetRoleExpectation{ - mock: mmGetRole.mock, - params: &ClientMockGetRoleParams{ctx, serviceID, name}, - expectationOrigins: ClientMockGetRoleExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetRole.mock, + params: &ClientMockGetRoleParams{ctx, serviceID, name}, } mmGetRole.expectations = append(mmGetRole.expectations, expectation) return expectation @@ -10392,7 +9691,6 @@ func (mmGetRole *mClientMockGetRole) Times(n uint64) *mClientMockGetRole { mmGetRole.mock.t.Fatalf("Times of ClientMock.GetRole mock can not be zero") } mm_atomic.StoreUint64(&mmGetRole.expectedInvocations, n) - mmGetRole.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetRole } @@ -10412,8 +9710,6 @@ func (mmGetRole *ClientMock) GetRole(ctx context.Context, serviceID string, name mm_atomic.AddUint64(&mmGetRole.beforeGetRoleCounter, 1) defer mm_atomic.AddUint64(&mmGetRole.afterGetRoleCounter, 1) - mmGetRole.t.Helper() - if mmGetRole.inspectFuncGetRole != nil { mmGetRole.inspectFuncGetRole(ctx, serviceID, name) } @@ -10442,23 +9738,19 @@ func (mmGetRole *ClientMock) GetRole(ctx context.Context, serviceID string, name if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetRole.t.Errorf("ClientMock.GetRole got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetRole.GetRoleMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetRole.t.Errorf("ClientMock.GetRole got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmGetRole.t.Errorf("ClientMock.GetRole got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetRole.GetRoleMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmGetRole.t.Errorf("ClientMock.GetRole got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.name != nil && !minimock.Equal(*mm_want_ptrs.name, mm_got.name) { - mmGetRole.t.Errorf("ClientMock.GetRole got unexpected parameter name, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetRole.GetRoleMock.defaultExpectation.expectationOrigins.originName, *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) + mmGetRole.t.Errorf("ClientMock.GetRole got unexpected parameter name, want: %#v, got: %#v%s\n", *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetRole.t.Errorf("ClientMock.GetRole got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetRole.GetRoleMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetRole.t.Errorf("ClientMock.GetRole got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetRole.GetRoleMock.defaultExpectation.results @@ -10518,7 +9810,7 @@ func (m *ClientMock) MinimockGetRoleDone() bool { func (m *ClientMock) MinimockGetRoleInspect() { for _, e := range m.GetRoleMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetRole at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetRole with params: %#v", *e.params) } } @@ -10526,19 +9818,19 @@ func (m *ClientMock) MinimockGetRoleInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetRoleMock.defaultExpectation != nil && afterGetRoleCounter < 1 { if m.GetRoleMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetRole at\n%s", m.GetRoleMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetRole") } else { - m.t.Errorf("Expected call to ClientMock.GetRole at\n%s with params: %#v", m.GetRoleMock.defaultExpectation.expectationOrigins.origin, *m.GetRoleMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetRole with params: %#v", *m.GetRoleMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetRole != nil && afterGetRoleCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetRole at\n%s", m.funcGetRoleOrigin) + m.t.Error("Expected call to ClientMock.GetRole") } if !m.GetRoleMock.invocationsDone() && afterGetRoleCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetRole at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetRoleMock.expectedInvocations), m.GetRoleMock.expectedInvocationsOrigin, afterGetRoleCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetRole but found %d calls", + mm_atomic.LoadUint64(&m.GetRoleMock.expectedInvocations), afterGetRoleCounter) } } @@ -10551,19 +9843,16 @@ type mClientMockGetService struct { callArgs []*ClientMockGetServiceParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetServiceExpectation specifies expectation struct of the Client.GetService type ClientMockGetServiceExpectation struct { - mock *ClientMock - params *ClientMockGetServiceParams - paramPtrs *ClientMockGetServiceParamPtrs - expectationOrigins ClientMockGetServiceExpectationOrigins - results *ClientMockGetServiceResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetServiceParams + paramPtrs *ClientMockGetServiceParamPtrs + results *ClientMockGetServiceResults + Counter uint64 } // ClientMockGetServiceParams contains parameters of the Client.GetService @@ -10584,13 +9873,6 @@ type ClientMockGetServiceResults struct { err error } -// ClientMockGetServiceOrigins contains origins of expectations of the Client.GetService -type ClientMockGetServiceExpectationOrigins struct { - origin string - originCtx string - originServiceId string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -10616,7 +9898,6 @@ func (mmGetService *mClientMockGetService) Expect(ctx context.Context, serviceId } mmGetService.defaultExpectation.params = &ClientMockGetServiceParams{ctx, serviceId} - mmGetService.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetService.expectations { if minimock.Equal(e.params, mmGetService.defaultExpectation.params) { mmGetService.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetService.defaultExpectation.params) @@ -10644,7 +9925,6 @@ func (mmGetService *mClientMockGetService) ExpectCtxParam1(ctx context.Context) mmGetService.defaultExpectation.paramPtrs = &ClientMockGetServiceParamPtrs{} } mmGetService.defaultExpectation.paramPtrs.ctx = &ctx - mmGetService.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetService } @@ -10667,7 +9947,6 @@ func (mmGetService *mClientMockGetService) ExpectServiceIdParam2(serviceId strin mmGetService.defaultExpectation.paramPtrs = &ClientMockGetServiceParamPtrs{} } mmGetService.defaultExpectation.paramPtrs.serviceId = &serviceId - mmGetService.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmGetService } @@ -10693,7 +9972,6 @@ func (mmGetService *mClientMockGetService) Return(sp1 *Service, err error) *Clie mmGetService.defaultExpectation = &ClientMockGetServiceExpectation{mock: mmGetService.mock} } mmGetService.defaultExpectation.results = &ClientMockGetServiceResults{sp1, err} - mmGetService.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetService.mock } @@ -10708,7 +9986,6 @@ func (mmGetService *mClientMockGetService) Set(f func(ctx context.Context, servi } mmGetService.mock.funcGetService = f - mmGetService.mock.funcGetServiceOrigin = minimock.CallerInfo(1) return mmGetService.mock } @@ -10720,9 +9997,8 @@ func (mmGetService *mClientMockGetService) When(ctx context.Context, serviceId s } expectation := &ClientMockGetServiceExpectation{ - mock: mmGetService.mock, - params: &ClientMockGetServiceParams{ctx, serviceId}, - expectationOrigins: ClientMockGetServiceExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetService.mock, + params: &ClientMockGetServiceParams{ctx, serviceId}, } mmGetService.expectations = append(mmGetService.expectations, expectation) return expectation @@ -10740,7 +10016,6 @@ func (mmGetService *mClientMockGetService) Times(n uint64) *mClientMockGetServic mmGetService.mock.t.Fatalf("Times of ClientMock.GetService mock can not be zero") } mm_atomic.StoreUint64(&mmGetService.expectedInvocations, n) - mmGetService.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetService } @@ -10760,8 +10035,6 @@ func (mmGetService *ClientMock) GetService(ctx context.Context, serviceId string mm_atomic.AddUint64(&mmGetService.beforeGetServiceCounter, 1) defer mm_atomic.AddUint64(&mmGetService.afterGetServiceCounter, 1) - mmGetService.t.Helper() - if mmGetService.inspectFuncGetService != nil { mmGetService.inspectFuncGetService(ctx, serviceId) } @@ -10790,18 +10063,15 @@ func (mmGetService *ClientMock) GetService(ctx context.Context, serviceId string if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetService.t.Errorf("ClientMock.GetService got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetService.GetServiceMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetService.t.Errorf("ClientMock.GetService got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmGetService.t.Errorf("ClientMock.GetService got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetService.GetServiceMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmGetService.t.Errorf("ClientMock.GetService got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetService.t.Errorf("ClientMock.GetService got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetService.GetServiceMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetService.t.Errorf("ClientMock.GetService got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetService.GetServiceMock.defaultExpectation.results @@ -10861,7 +10131,7 @@ func (m *ClientMock) MinimockGetServiceDone() bool { func (m *ClientMock) MinimockGetServiceInspect() { for _, e := range m.GetServiceMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetService at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetService with params: %#v", *e.params) } } @@ -10869,19 +10139,19 @@ func (m *ClientMock) MinimockGetServiceInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetServiceMock.defaultExpectation != nil && afterGetServiceCounter < 1 { if m.GetServiceMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetService at\n%s", m.GetServiceMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetService") } else { - m.t.Errorf("Expected call to ClientMock.GetService at\n%s with params: %#v", m.GetServiceMock.defaultExpectation.expectationOrigins.origin, *m.GetServiceMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetService with params: %#v", *m.GetServiceMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetService != nil && afterGetServiceCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetService at\n%s", m.funcGetServiceOrigin) + m.t.Error("Expected call to ClientMock.GetService") } if !m.GetServiceMock.invocationsDone() && afterGetServiceCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetService at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetServiceMock.expectedInvocations), m.GetServiceMock.expectedInvocationsOrigin, afterGetServiceCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetService but found %d calls", + mm_atomic.LoadUint64(&m.GetServiceMock.expectedInvocations), afterGetServiceCounter) } } @@ -10894,19 +10164,16 @@ type mClientMockGetUser struct { callArgs []*ClientMockGetUserParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGetUserExpectation specifies expectation struct of the Client.GetUser type ClientMockGetUserExpectation struct { - mock *ClientMock - params *ClientMockGetUserParams - paramPtrs *ClientMockGetUserParamPtrs - expectationOrigins ClientMockGetUserExpectationOrigins - results *ClientMockGetUserResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGetUserParams + paramPtrs *ClientMockGetUserParamPtrs + results *ClientMockGetUserResults + Counter uint64 } // ClientMockGetUserParams contains parameters of the Client.GetUser @@ -10929,14 +10196,6 @@ type ClientMockGetUserResults struct { err error } -// ClientMockGetUserOrigins contains origins of expectations of the Client.GetUser -type ClientMockGetUserExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originName string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -10962,7 +10221,6 @@ func (mmGetUser *mClientMockGetUser) Expect(ctx context.Context, serviceID strin } mmGetUser.defaultExpectation.params = &ClientMockGetUserParams{ctx, serviceID, name} - mmGetUser.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGetUser.expectations { if minimock.Equal(e.params, mmGetUser.defaultExpectation.params) { mmGetUser.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetUser.defaultExpectation.params) @@ -10990,7 +10248,6 @@ func (mmGetUser *mClientMockGetUser) ExpectCtxParam1(ctx context.Context) *mClie mmGetUser.defaultExpectation.paramPtrs = &ClientMockGetUserParamPtrs{} } mmGetUser.defaultExpectation.paramPtrs.ctx = &ctx - mmGetUser.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGetUser } @@ -11013,7 +10270,6 @@ func (mmGetUser *mClientMockGetUser) ExpectServiceIDParam2(serviceID string) *mC mmGetUser.defaultExpectation.paramPtrs = &ClientMockGetUserParamPtrs{} } mmGetUser.defaultExpectation.paramPtrs.serviceID = &serviceID - mmGetUser.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmGetUser } @@ -11036,7 +10292,6 @@ func (mmGetUser *mClientMockGetUser) ExpectNameParam3(name string) *mClientMockG mmGetUser.defaultExpectation.paramPtrs = &ClientMockGetUserParamPtrs{} } mmGetUser.defaultExpectation.paramPtrs.name = &name - mmGetUser.defaultExpectation.expectationOrigins.originName = minimock.CallerInfo(1) return mmGetUser } @@ -11062,7 +10317,6 @@ func (mmGetUser *mClientMockGetUser) Return(up1 *User, err error) *ClientMock { mmGetUser.defaultExpectation = &ClientMockGetUserExpectation{mock: mmGetUser.mock} } mmGetUser.defaultExpectation.results = &ClientMockGetUserResults{up1, err} - mmGetUser.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGetUser.mock } @@ -11077,7 +10331,6 @@ func (mmGetUser *mClientMockGetUser) Set(f func(ctx context.Context, serviceID s } mmGetUser.mock.funcGetUser = f - mmGetUser.mock.funcGetUserOrigin = minimock.CallerInfo(1) return mmGetUser.mock } @@ -11089,9 +10342,8 @@ func (mmGetUser *mClientMockGetUser) When(ctx context.Context, serviceID string, } expectation := &ClientMockGetUserExpectation{ - mock: mmGetUser.mock, - params: &ClientMockGetUserParams{ctx, serviceID, name}, - expectationOrigins: ClientMockGetUserExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGetUser.mock, + params: &ClientMockGetUserParams{ctx, serviceID, name}, } mmGetUser.expectations = append(mmGetUser.expectations, expectation) return expectation @@ -11109,7 +10361,6 @@ func (mmGetUser *mClientMockGetUser) Times(n uint64) *mClientMockGetUser { mmGetUser.mock.t.Fatalf("Times of ClientMock.GetUser mock can not be zero") } mm_atomic.StoreUint64(&mmGetUser.expectedInvocations, n) - mmGetUser.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGetUser } @@ -11129,8 +10380,6 @@ func (mmGetUser *ClientMock) GetUser(ctx context.Context, serviceID string, name mm_atomic.AddUint64(&mmGetUser.beforeGetUserCounter, 1) defer mm_atomic.AddUint64(&mmGetUser.afterGetUserCounter, 1) - mmGetUser.t.Helper() - if mmGetUser.inspectFuncGetUser != nil { mmGetUser.inspectFuncGetUser(ctx, serviceID, name) } @@ -11159,23 +10408,19 @@ func (mmGetUser *ClientMock) GetUser(ctx context.Context, serviceID string, name if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGetUser.t.Errorf("ClientMock.GetUser got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetUser.GetUserMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGetUser.t.Errorf("ClientMock.GetUser got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmGetUser.t.Errorf("ClientMock.GetUser got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetUser.GetUserMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmGetUser.t.Errorf("ClientMock.GetUser got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.name != nil && !minimock.Equal(*mm_want_ptrs.name, mm_got.name) { - mmGetUser.t.Errorf("ClientMock.GetUser got unexpected parameter name, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetUser.GetUserMock.defaultExpectation.expectationOrigins.originName, *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) + mmGetUser.t.Errorf("ClientMock.GetUser got unexpected parameter name, want: %#v, got: %#v%s\n", *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGetUser.t.Errorf("ClientMock.GetUser got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGetUser.GetUserMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGetUser.t.Errorf("ClientMock.GetUser got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGetUser.GetUserMock.defaultExpectation.results @@ -11235,7 +10480,7 @@ func (m *ClientMock) MinimockGetUserDone() bool { func (m *ClientMock) MinimockGetUserInspect() { for _, e := range m.GetUserMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GetUser at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GetUser with params: %#v", *e.params) } } @@ -11243,19 +10488,19 @@ func (m *ClientMock) MinimockGetUserInspect() { // if default expectation was set then invocations count should be greater than zero if m.GetUserMock.defaultExpectation != nil && afterGetUserCounter < 1 { if m.GetUserMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GetUser at\n%s", m.GetUserMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GetUser") } else { - m.t.Errorf("Expected call to ClientMock.GetUser at\n%s with params: %#v", m.GetUserMock.defaultExpectation.expectationOrigins.origin, *m.GetUserMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GetUser with params: %#v", *m.GetUserMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGetUser != nil && afterGetUserCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GetUser at\n%s", m.funcGetUserOrigin) + m.t.Error("Expected call to ClientMock.GetUser") } if !m.GetUserMock.invocationsDone() && afterGetUserCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GetUser at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GetUserMock.expectedInvocations), m.GetUserMock.expectedInvocationsOrigin, afterGetUserCounter) + m.t.Errorf("Expected %d calls to ClientMock.GetUser but found %d calls", + mm_atomic.LoadUint64(&m.GetUserMock.expectedInvocations), afterGetUserCounter) } } @@ -11268,19 +10513,16 @@ type mClientMockGrantPrivilege struct { callArgs []*ClientMockGrantPrivilegeParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGrantPrivilegeExpectation specifies expectation struct of the Client.GrantPrivilege type ClientMockGrantPrivilegeExpectation struct { - mock *ClientMock - params *ClientMockGrantPrivilegeParams - paramPtrs *ClientMockGrantPrivilegeParamPtrs - expectationOrigins ClientMockGrantPrivilegeExpectationOrigins - results *ClientMockGrantPrivilegeResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGrantPrivilegeParams + paramPtrs *ClientMockGrantPrivilegeParamPtrs + results *ClientMockGrantPrivilegeResults + Counter uint64 } // ClientMockGrantPrivilegeParams contains parameters of the Client.GrantPrivilege @@ -11303,14 +10545,6 @@ type ClientMockGrantPrivilegeResults struct { err error } -// ClientMockGrantPrivilegeOrigins contains origins of expectations of the Client.GrantPrivilege -type ClientMockGrantPrivilegeExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originGrantPrivilege string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -11336,7 +10570,6 @@ func (mmGrantPrivilege *mClientMockGrantPrivilege) Expect(ctx context.Context, s } mmGrantPrivilege.defaultExpectation.params = &ClientMockGrantPrivilegeParams{ctx, serviceId, grantPrivilege} - mmGrantPrivilege.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGrantPrivilege.expectations { if minimock.Equal(e.params, mmGrantPrivilege.defaultExpectation.params) { mmGrantPrivilege.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGrantPrivilege.defaultExpectation.params) @@ -11364,7 +10597,6 @@ func (mmGrantPrivilege *mClientMockGrantPrivilege) ExpectCtxParam1(ctx context.C mmGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockGrantPrivilegeParamPtrs{} } mmGrantPrivilege.defaultExpectation.paramPtrs.ctx = &ctx - mmGrantPrivilege.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGrantPrivilege } @@ -11387,7 +10619,6 @@ func (mmGrantPrivilege *mClientMockGrantPrivilege) ExpectServiceIdParam2(service mmGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockGrantPrivilegeParamPtrs{} } mmGrantPrivilege.defaultExpectation.paramPtrs.serviceId = &serviceId - mmGrantPrivilege.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmGrantPrivilege } @@ -11410,7 +10641,6 @@ func (mmGrantPrivilege *mClientMockGrantPrivilege) ExpectGrantPrivilegeParam3(gr mmGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockGrantPrivilegeParamPtrs{} } mmGrantPrivilege.defaultExpectation.paramPtrs.grantPrivilege = &grantPrivilege - mmGrantPrivilege.defaultExpectation.expectationOrigins.originGrantPrivilege = minimock.CallerInfo(1) return mmGrantPrivilege } @@ -11436,7 +10666,6 @@ func (mmGrantPrivilege *mClientMockGrantPrivilege) Return(gp1 *GrantPrivilege, e mmGrantPrivilege.defaultExpectation = &ClientMockGrantPrivilegeExpectation{mock: mmGrantPrivilege.mock} } mmGrantPrivilege.defaultExpectation.results = &ClientMockGrantPrivilegeResults{gp1, err} - mmGrantPrivilege.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGrantPrivilege.mock } @@ -11451,7 +10680,6 @@ func (mmGrantPrivilege *mClientMockGrantPrivilege) Set(f func(ctx context.Contex } mmGrantPrivilege.mock.funcGrantPrivilege = f - mmGrantPrivilege.mock.funcGrantPrivilegeOrigin = minimock.CallerInfo(1) return mmGrantPrivilege.mock } @@ -11463,9 +10691,8 @@ func (mmGrantPrivilege *mClientMockGrantPrivilege) When(ctx context.Context, ser } expectation := &ClientMockGrantPrivilegeExpectation{ - mock: mmGrantPrivilege.mock, - params: &ClientMockGrantPrivilegeParams{ctx, serviceId, grantPrivilege}, - expectationOrigins: ClientMockGrantPrivilegeExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGrantPrivilege.mock, + params: &ClientMockGrantPrivilegeParams{ctx, serviceId, grantPrivilege}, } mmGrantPrivilege.expectations = append(mmGrantPrivilege.expectations, expectation) return expectation @@ -11483,7 +10710,6 @@ func (mmGrantPrivilege *mClientMockGrantPrivilege) Times(n uint64) *mClientMockG mmGrantPrivilege.mock.t.Fatalf("Times of ClientMock.GrantPrivilege mock can not be zero") } mm_atomic.StoreUint64(&mmGrantPrivilege.expectedInvocations, n) - mmGrantPrivilege.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGrantPrivilege } @@ -11503,8 +10729,6 @@ func (mmGrantPrivilege *ClientMock) GrantPrivilege(ctx context.Context, serviceI mm_atomic.AddUint64(&mmGrantPrivilege.beforeGrantPrivilegeCounter, 1) defer mm_atomic.AddUint64(&mmGrantPrivilege.afterGrantPrivilegeCounter, 1) - mmGrantPrivilege.t.Helper() - if mmGrantPrivilege.inspectFuncGrantPrivilege != nil { mmGrantPrivilege.inspectFuncGrantPrivilege(ctx, serviceId, grantPrivilege) } @@ -11533,23 +10757,19 @@ func (mmGrantPrivilege *ClientMock) GrantPrivilege(ctx context.Context, serviceI if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGrantPrivilege.t.Errorf("ClientMock.GrantPrivilege got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGrantPrivilege.GrantPrivilegeMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGrantPrivilege.t.Errorf("ClientMock.GrantPrivilege got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmGrantPrivilege.t.Errorf("ClientMock.GrantPrivilege got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGrantPrivilege.GrantPrivilegeMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmGrantPrivilege.t.Errorf("ClientMock.GrantPrivilege got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.grantPrivilege != nil && !minimock.Equal(*mm_want_ptrs.grantPrivilege, mm_got.grantPrivilege) { - mmGrantPrivilege.t.Errorf("ClientMock.GrantPrivilege got unexpected parameter grantPrivilege, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGrantPrivilege.GrantPrivilegeMock.defaultExpectation.expectationOrigins.originGrantPrivilege, *mm_want_ptrs.grantPrivilege, mm_got.grantPrivilege, minimock.Diff(*mm_want_ptrs.grantPrivilege, mm_got.grantPrivilege)) + mmGrantPrivilege.t.Errorf("ClientMock.GrantPrivilege got unexpected parameter grantPrivilege, want: %#v, got: %#v%s\n", *mm_want_ptrs.grantPrivilege, mm_got.grantPrivilege, minimock.Diff(*mm_want_ptrs.grantPrivilege, mm_got.grantPrivilege)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGrantPrivilege.t.Errorf("ClientMock.GrantPrivilege got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGrantPrivilege.GrantPrivilegeMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGrantPrivilege.t.Errorf("ClientMock.GrantPrivilege got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGrantPrivilege.GrantPrivilegeMock.defaultExpectation.results @@ -11609,7 +10829,7 @@ func (m *ClientMock) MinimockGrantPrivilegeDone() bool { func (m *ClientMock) MinimockGrantPrivilegeInspect() { for _, e := range m.GrantPrivilegeMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GrantPrivilege at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GrantPrivilege with params: %#v", *e.params) } } @@ -11617,19 +10837,19 @@ func (m *ClientMock) MinimockGrantPrivilegeInspect() { // if default expectation was set then invocations count should be greater than zero if m.GrantPrivilegeMock.defaultExpectation != nil && afterGrantPrivilegeCounter < 1 { if m.GrantPrivilegeMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GrantPrivilege at\n%s", m.GrantPrivilegeMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GrantPrivilege") } else { - m.t.Errorf("Expected call to ClientMock.GrantPrivilege at\n%s with params: %#v", m.GrantPrivilegeMock.defaultExpectation.expectationOrigins.origin, *m.GrantPrivilegeMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GrantPrivilege with params: %#v", *m.GrantPrivilegeMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGrantPrivilege != nil && afterGrantPrivilegeCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GrantPrivilege at\n%s", m.funcGrantPrivilegeOrigin) + m.t.Error("Expected call to ClientMock.GrantPrivilege") } if !m.GrantPrivilegeMock.invocationsDone() && afterGrantPrivilegeCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GrantPrivilege at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GrantPrivilegeMock.expectedInvocations), m.GrantPrivilegeMock.expectedInvocationsOrigin, afterGrantPrivilegeCounter) + m.t.Errorf("Expected %d calls to ClientMock.GrantPrivilege but found %d calls", + mm_atomic.LoadUint64(&m.GrantPrivilegeMock.expectedInvocations), afterGrantPrivilegeCounter) } } @@ -11642,19 +10862,16 @@ type mClientMockGrantRole struct { callArgs []*ClientMockGrantRoleParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockGrantRoleExpectation specifies expectation struct of the Client.GrantRole type ClientMockGrantRoleExpectation struct { - mock *ClientMock - params *ClientMockGrantRoleParams - paramPtrs *ClientMockGrantRoleParamPtrs - expectationOrigins ClientMockGrantRoleExpectationOrigins - results *ClientMockGrantRoleResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockGrantRoleParams + paramPtrs *ClientMockGrantRoleParamPtrs + results *ClientMockGrantRoleResults + Counter uint64 } // ClientMockGrantRoleParams contains parameters of the Client.GrantRole @@ -11677,14 +10894,6 @@ type ClientMockGrantRoleResults struct { err error } -// ClientMockGrantRoleOrigins contains origins of expectations of the Client.GrantRole -type ClientMockGrantRoleExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originGrantRole string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -11710,7 +10919,6 @@ func (mmGrantRole *mClientMockGrantRole) Expect(ctx context.Context, serviceId s } mmGrantRole.defaultExpectation.params = &ClientMockGrantRoleParams{ctx, serviceId, grantRole} - mmGrantRole.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmGrantRole.expectations { if minimock.Equal(e.params, mmGrantRole.defaultExpectation.params) { mmGrantRole.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGrantRole.defaultExpectation.params) @@ -11738,7 +10946,6 @@ func (mmGrantRole *mClientMockGrantRole) ExpectCtxParam1(ctx context.Context) *m mmGrantRole.defaultExpectation.paramPtrs = &ClientMockGrantRoleParamPtrs{} } mmGrantRole.defaultExpectation.paramPtrs.ctx = &ctx - mmGrantRole.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmGrantRole } @@ -11761,7 +10968,6 @@ func (mmGrantRole *mClientMockGrantRole) ExpectServiceIdParam2(serviceId string) mmGrantRole.defaultExpectation.paramPtrs = &ClientMockGrantRoleParamPtrs{} } mmGrantRole.defaultExpectation.paramPtrs.serviceId = &serviceId - mmGrantRole.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmGrantRole } @@ -11784,7 +10990,6 @@ func (mmGrantRole *mClientMockGrantRole) ExpectGrantRoleParam3(grantRole GrantRo mmGrantRole.defaultExpectation.paramPtrs = &ClientMockGrantRoleParamPtrs{} } mmGrantRole.defaultExpectation.paramPtrs.grantRole = &grantRole - mmGrantRole.defaultExpectation.expectationOrigins.originGrantRole = minimock.CallerInfo(1) return mmGrantRole } @@ -11810,7 +11015,6 @@ func (mmGrantRole *mClientMockGrantRole) Return(gp1 *GrantRole, err error) *Clie mmGrantRole.defaultExpectation = &ClientMockGrantRoleExpectation{mock: mmGrantRole.mock} } mmGrantRole.defaultExpectation.results = &ClientMockGrantRoleResults{gp1, err} - mmGrantRole.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmGrantRole.mock } @@ -11825,7 +11029,6 @@ func (mmGrantRole *mClientMockGrantRole) Set(f func(ctx context.Context, service } mmGrantRole.mock.funcGrantRole = f - mmGrantRole.mock.funcGrantRoleOrigin = minimock.CallerInfo(1) return mmGrantRole.mock } @@ -11837,9 +11040,8 @@ func (mmGrantRole *mClientMockGrantRole) When(ctx context.Context, serviceId str } expectation := &ClientMockGrantRoleExpectation{ - mock: mmGrantRole.mock, - params: &ClientMockGrantRoleParams{ctx, serviceId, grantRole}, - expectationOrigins: ClientMockGrantRoleExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmGrantRole.mock, + params: &ClientMockGrantRoleParams{ctx, serviceId, grantRole}, } mmGrantRole.expectations = append(mmGrantRole.expectations, expectation) return expectation @@ -11857,7 +11059,6 @@ func (mmGrantRole *mClientMockGrantRole) Times(n uint64) *mClientMockGrantRole { mmGrantRole.mock.t.Fatalf("Times of ClientMock.GrantRole mock can not be zero") } mm_atomic.StoreUint64(&mmGrantRole.expectedInvocations, n) - mmGrantRole.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmGrantRole } @@ -11877,8 +11078,6 @@ func (mmGrantRole *ClientMock) GrantRole(ctx context.Context, serviceId string, mm_atomic.AddUint64(&mmGrantRole.beforeGrantRoleCounter, 1) defer mm_atomic.AddUint64(&mmGrantRole.afterGrantRoleCounter, 1) - mmGrantRole.t.Helper() - if mmGrantRole.inspectFuncGrantRole != nil { mmGrantRole.inspectFuncGrantRole(ctx, serviceId, grantRole) } @@ -11907,23 +11106,19 @@ func (mmGrantRole *ClientMock) GrantRole(ctx context.Context, serviceId string, if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmGrantRole.t.Errorf("ClientMock.GrantRole got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGrantRole.GrantRoleMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmGrantRole.t.Errorf("ClientMock.GrantRole got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmGrantRole.t.Errorf("ClientMock.GrantRole got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGrantRole.GrantRoleMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmGrantRole.t.Errorf("ClientMock.GrantRole got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.grantRole != nil && !minimock.Equal(*mm_want_ptrs.grantRole, mm_got.grantRole) { - mmGrantRole.t.Errorf("ClientMock.GrantRole got unexpected parameter grantRole, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGrantRole.GrantRoleMock.defaultExpectation.expectationOrigins.originGrantRole, *mm_want_ptrs.grantRole, mm_got.grantRole, minimock.Diff(*mm_want_ptrs.grantRole, mm_got.grantRole)) + mmGrantRole.t.Errorf("ClientMock.GrantRole got unexpected parameter grantRole, want: %#v, got: %#v%s\n", *mm_want_ptrs.grantRole, mm_got.grantRole, minimock.Diff(*mm_want_ptrs.grantRole, mm_got.grantRole)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmGrantRole.t.Errorf("ClientMock.GrantRole got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmGrantRole.GrantRoleMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmGrantRole.t.Errorf("ClientMock.GrantRole got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmGrantRole.GrantRoleMock.defaultExpectation.results @@ -11983,7 +11178,7 @@ func (m *ClientMock) MinimockGrantRoleDone() bool { func (m *ClientMock) MinimockGrantRoleInspect() { for _, e := range m.GrantRoleMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.GrantRole at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.GrantRole with params: %#v", *e.params) } } @@ -11991,19 +11186,19 @@ func (m *ClientMock) MinimockGrantRoleInspect() { // if default expectation was set then invocations count should be greater than zero if m.GrantRoleMock.defaultExpectation != nil && afterGrantRoleCounter < 1 { if m.GrantRoleMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.GrantRole at\n%s", m.GrantRoleMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.GrantRole") } else { - m.t.Errorf("Expected call to ClientMock.GrantRole at\n%s with params: %#v", m.GrantRoleMock.defaultExpectation.expectationOrigins.origin, *m.GrantRoleMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.GrantRole with params: %#v", *m.GrantRoleMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcGrantRole != nil && afterGrantRoleCounter < 1 { - m.t.Errorf("Expected call to ClientMock.GrantRole at\n%s", m.funcGrantRoleOrigin) + m.t.Error("Expected call to ClientMock.GrantRole") } if !m.GrantRoleMock.invocationsDone() && afterGrantRoleCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.GrantRole at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.GrantRoleMock.expectedInvocations), m.GrantRoleMock.expectedInvocationsOrigin, afterGrantRoleCounter) + m.t.Errorf("Expected %d calls to ClientMock.GrantRole but found %d calls", + mm_atomic.LoadUint64(&m.GrantRoleMock.expectedInvocations), afterGrantRoleCounter) } } @@ -12016,19 +11211,16 @@ type mClientMockListReversePrivateEndpoints struct { callArgs []*ClientMockListReversePrivateEndpointsParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockListReversePrivateEndpointsExpectation specifies expectation struct of the Client.ListReversePrivateEndpoints type ClientMockListReversePrivateEndpointsExpectation struct { - mock *ClientMock - params *ClientMockListReversePrivateEndpointsParams - paramPtrs *ClientMockListReversePrivateEndpointsParamPtrs - expectationOrigins ClientMockListReversePrivateEndpointsExpectationOrigins - results *ClientMockListReversePrivateEndpointsResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockListReversePrivateEndpointsParams + paramPtrs *ClientMockListReversePrivateEndpointsParamPtrs + results *ClientMockListReversePrivateEndpointsResults + Counter uint64 } // ClientMockListReversePrivateEndpointsParams contains parameters of the Client.ListReversePrivateEndpoints @@ -12049,13 +11241,6 @@ type ClientMockListReversePrivateEndpointsResults struct { err error } -// ClientMockListReversePrivateEndpointsOrigins contains origins of expectations of the Client.ListReversePrivateEndpoints -type ClientMockListReversePrivateEndpointsExpectationOrigins struct { - origin string - originCtx string - originServiceId string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -12081,7 +11266,6 @@ func (mmListReversePrivateEndpoints *mClientMockListReversePrivateEndpoints) Exp } mmListReversePrivateEndpoints.defaultExpectation.params = &ClientMockListReversePrivateEndpointsParams{ctx, serviceId} - mmListReversePrivateEndpoints.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmListReversePrivateEndpoints.expectations { if minimock.Equal(e.params, mmListReversePrivateEndpoints.defaultExpectation.params) { mmListReversePrivateEndpoints.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmListReversePrivateEndpoints.defaultExpectation.params) @@ -12109,7 +11293,6 @@ func (mmListReversePrivateEndpoints *mClientMockListReversePrivateEndpoints) Exp mmListReversePrivateEndpoints.defaultExpectation.paramPtrs = &ClientMockListReversePrivateEndpointsParamPtrs{} } mmListReversePrivateEndpoints.defaultExpectation.paramPtrs.ctx = &ctx - mmListReversePrivateEndpoints.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmListReversePrivateEndpoints } @@ -12132,7 +11315,6 @@ func (mmListReversePrivateEndpoints *mClientMockListReversePrivateEndpoints) Exp mmListReversePrivateEndpoints.defaultExpectation.paramPtrs = &ClientMockListReversePrivateEndpointsParamPtrs{} } mmListReversePrivateEndpoints.defaultExpectation.paramPtrs.serviceId = &serviceId - mmListReversePrivateEndpoints.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmListReversePrivateEndpoints } @@ -12158,7 +11340,6 @@ func (mmListReversePrivateEndpoints *mClientMockListReversePrivateEndpoints) Ret mmListReversePrivateEndpoints.defaultExpectation = &ClientMockListReversePrivateEndpointsExpectation{mock: mmListReversePrivateEndpoints.mock} } mmListReversePrivateEndpoints.defaultExpectation.results = &ClientMockListReversePrivateEndpointsResults{rpa1, err} - mmListReversePrivateEndpoints.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmListReversePrivateEndpoints.mock } @@ -12173,7 +11354,6 @@ func (mmListReversePrivateEndpoints *mClientMockListReversePrivateEndpoints) Set } mmListReversePrivateEndpoints.mock.funcListReversePrivateEndpoints = f - mmListReversePrivateEndpoints.mock.funcListReversePrivateEndpointsOrigin = minimock.CallerInfo(1) return mmListReversePrivateEndpoints.mock } @@ -12185,9 +11365,8 @@ func (mmListReversePrivateEndpoints *mClientMockListReversePrivateEndpoints) Whe } expectation := &ClientMockListReversePrivateEndpointsExpectation{ - mock: mmListReversePrivateEndpoints.mock, - params: &ClientMockListReversePrivateEndpointsParams{ctx, serviceId}, - expectationOrigins: ClientMockListReversePrivateEndpointsExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmListReversePrivateEndpoints.mock, + params: &ClientMockListReversePrivateEndpointsParams{ctx, serviceId}, } mmListReversePrivateEndpoints.expectations = append(mmListReversePrivateEndpoints.expectations, expectation) return expectation @@ -12205,7 +11384,6 @@ func (mmListReversePrivateEndpoints *mClientMockListReversePrivateEndpoints) Tim mmListReversePrivateEndpoints.mock.t.Fatalf("Times of ClientMock.ListReversePrivateEndpoints mock can not be zero") } mm_atomic.StoreUint64(&mmListReversePrivateEndpoints.expectedInvocations, n) - mmListReversePrivateEndpoints.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmListReversePrivateEndpoints } @@ -12225,8 +11403,6 @@ func (mmListReversePrivateEndpoints *ClientMock) ListReversePrivateEndpoints(ctx mm_atomic.AddUint64(&mmListReversePrivateEndpoints.beforeListReversePrivateEndpointsCounter, 1) defer mm_atomic.AddUint64(&mmListReversePrivateEndpoints.afterListReversePrivateEndpointsCounter, 1) - mmListReversePrivateEndpoints.t.Helper() - if mmListReversePrivateEndpoints.inspectFuncListReversePrivateEndpoints != nil { mmListReversePrivateEndpoints.inspectFuncListReversePrivateEndpoints(ctx, serviceId) } @@ -12255,18 +11431,15 @@ func (mmListReversePrivateEndpoints *ClientMock) ListReversePrivateEndpoints(ctx if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmListReversePrivateEndpoints.t.Errorf("ClientMock.ListReversePrivateEndpoints got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmListReversePrivateEndpoints.ListReversePrivateEndpointsMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmListReversePrivateEndpoints.t.Errorf("ClientMock.ListReversePrivateEndpoints got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmListReversePrivateEndpoints.t.Errorf("ClientMock.ListReversePrivateEndpoints got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmListReversePrivateEndpoints.ListReversePrivateEndpointsMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmListReversePrivateEndpoints.t.Errorf("ClientMock.ListReversePrivateEndpoints got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmListReversePrivateEndpoints.t.Errorf("ClientMock.ListReversePrivateEndpoints got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmListReversePrivateEndpoints.ListReversePrivateEndpointsMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmListReversePrivateEndpoints.t.Errorf("ClientMock.ListReversePrivateEndpoints got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmListReversePrivateEndpoints.ListReversePrivateEndpointsMock.defaultExpectation.results @@ -12326,7 +11499,7 @@ func (m *ClientMock) MinimockListReversePrivateEndpointsDone() bool { func (m *ClientMock) MinimockListReversePrivateEndpointsInspect() { for _, e := range m.ListReversePrivateEndpointsMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.ListReversePrivateEndpoints at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.ListReversePrivateEndpoints with params: %#v", *e.params) } } @@ -12334,19 +11507,19 @@ func (m *ClientMock) MinimockListReversePrivateEndpointsInspect() { // if default expectation was set then invocations count should be greater than zero if m.ListReversePrivateEndpointsMock.defaultExpectation != nil && afterListReversePrivateEndpointsCounter < 1 { if m.ListReversePrivateEndpointsMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.ListReversePrivateEndpoints at\n%s", m.ListReversePrivateEndpointsMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.ListReversePrivateEndpoints") } else { - m.t.Errorf("Expected call to ClientMock.ListReversePrivateEndpoints at\n%s with params: %#v", m.ListReversePrivateEndpointsMock.defaultExpectation.expectationOrigins.origin, *m.ListReversePrivateEndpointsMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.ListReversePrivateEndpoints with params: %#v", *m.ListReversePrivateEndpointsMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcListReversePrivateEndpoints != nil && afterListReversePrivateEndpointsCounter < 1 { - m.t.Errorf("Expected call to ClientMock.ListReversePrivateEndpoints at\n%s", m.funcListReversePrivateEndpointsOrigin) + m.t.Error("Expected call to ClientMock.ListReversePrivateEndpoints") } if !m.ListReversePrivateEndpointsMock.invocationsDone() && afterListReversePrivateEndpointsCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.ListReversePrivateEndpoints at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.ListReversePrivateEndpointsMock.expectedInvocations), m.ListReversePrivateEndpointsMock.expectedInvocationsOrigin, afterListReversePrivateEndpointsCounter) + m.t.Errorf("Expected %d calls to ClientMock.ListReversePrivateEndpoints but found %d calls", + mm_atomic.LoadUint64(&m.ListReversePrivateEndpointsMock.expectedInvocations), afterListReversePrivateEndpointsCounter) } } @@ -12359,19 +11532,16 @@ type mClientMockRevokeGrantPrivilege struct { callArgs []*ClientMockRevokeGrantPrivilegeParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockRevokeGrantPrivilegeExpectation specifies expectation struct of the Client.RevokeGrantPrivilege type ClientMockRevokeGrantPrivilegeExpectation struct { - mock *ClientMock - params *ClientMockRevokeGrantPrivilegeParams - paramPtrs *ClientMockRevokeGrantPrivilegeParamPtrs - expectationOrigins ClientMockRevokeGrantPrivilegeExpectationOrigins - results *ClientMockRevokeGrantPrivilegeResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockRevokeGrantPrivilegeParams + paramPtrs *ClientMockRevokeGrantPrivilegeParamPtrs + results *ClientMockRevokeGrantPrivilegeResults + Counter uint64 } // ClientMockRevokeGrantPrivilegeParams contains parameters of the Client.RevokeGrantPrivilege @@ -12403,19 +11573,6 @@ type ClientMockRevokeGrantPrivilegeResults struct { err error } -// ClientMockRevokeGrantPrivilegeOrigins contains origins of expectations of the Client.RevokeGrantPrivilege -type ClientMockRevokeGrantPrivilegeExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originAccessType string - originDatabase string - originTable string - originColumn string - originGranteeUserName string - originGranteeRoleName string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -12441,7 +11598,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) Expect(ctx contex } mmRevokeGrantPrivilege.defaultExpectation.params = &ClientMockRevokeGrantPrivilegeParams{ctx, serviceID, accessType, database, table, column, granteeUserName, granteeRoleName} - mmRevokeGrantPrivilege.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmRevokeGrantPrivilege.expectations { if minimock.Equal(e.params, mmRevokeGrantPrivilege.defaultExpectation.params) { mmRevokeGrantPrivilege.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmRevokeGrantPrivilege.defaultExpectation.params) @@ -12469,7 +11625,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) ExpectCtxParam1(c mmRevokeGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockRevokeGrantPrivilegeParamPtrs{} } mmRevokeGrantPrivilege.defaultExpectation.paramPtrs.ctx = &ctx - mmRevokeGrantPrivilege.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmRevokeGrantPrivilege } @@ -12492,7 +11647,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) ExpectServiceIDPa mmRevokeGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockRevokeGrantPrivilegeParamPtrs{} } mmRevokeGrantPrivilege.defaultExpectation.paramPtrs.serviceID = &serviceID - mmRevokeGrantPrivilege.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmRevokeGrantPrivilege } @@ -12515,7 +11669,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) ExpectAccessTypeP mmRevokeGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockRevokeGrantPrivilegeParamPtrs{} } mmRevokeGrantPrivilege.defaultExpectation.paramPtrs.accessType = &accessType - mmRevokeGrantPrivilege.defaultExpectation.expectationOrigins.originAccessType = minimock.CallerInfo(1) return mmRevokeGrantPrivilege } @@ -12538,7 +11691,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) ExpectDatabasePar mmRevokeGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockRevokeGrantPrivilegeParamPtrs{} } mmRevokeGrantPrivilege.defaultExpectation.paramPtrs.database = &database - mmRevokeGrantPrivilege.defaultExpectation.expectationOrigins.originDatabase = minimock.CallerInfo(1) return mmRevokeGrantPrivilege } @@ -12561,7 +11713,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) ExpectTableParam5 mmRevokeGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockRevokeGrantPrivilegeParamPtrs{} } mmRevokeGrantPrivilege.defaultExpectation.paramPtrs.table = &table - mmRevokeGrantPrivilege.defaultExpectation.expectationOrigins.originTable = minimock.CallerInfo(1) return mmRevokeGrantPrivilege } @@ -12584,7 +11735,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) ExpectColumnParam mmRevokeGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockRevokeGrantPrivilegeParamPtrs{} } mmRevokeGrantPrivilege.defaultExpectation.paramPtrs.column = &column - mmRevokeGrantPrivilege.defaultExpectation.expectationOrigins.originColumn = minimock.CallerInfo(1) return mmRevokeGrantPrivilege } @@ -12607,7 +11757,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) ExpectGranteeUser mmRevokeGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockRevokeGrantPrivilegeParamPtrs{} } mmRevokeGrantPrivilege.defaultExpectation.paramPtrs.granteeUserName = &granteeUserName - mmRevokeGrantPrivilege.defaultExpectation.expectationOrigins.originGranteeUserName = minimock.CallerInfo(1) return mmRevokeGrantPrivilege } @@ -12630,7 +11779,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) ExpectGranteeRole mmRevokeGrantPrivilege.defaultExpectation.paramPtrs = &ClientMockRevokeGrantPrivilegeParamPtrs{} } mmRevokeGrantPrivilege.defaultExpectation.paramPtrs.granteeRoleName = &granteeRoleName - mmRevokeGrantPrivilege.defaultExpectation.expectationOrigins.originGranteeRoleName = minimock.CallerInfo(1) return mmRevokeGrantPrivilege } @@ -12656,7 +11804,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) Return(err error) mmRevokeGrantPrivilege.defaultExpectation = &ClientMockRevokeGrantPrivilegeExpectation{mock: mmRevokeGrantPrivilege.mock} } mmRevokeGrantPrivilege.defaultExpectation.results = &ClientMockRevokeGrantPrivilegeResults{err} - mmRevokeGrantPrivilege.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmRevokeGrantPrivilege.mock } @@ -12671,7 +11818,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) Set(f func(ctx co } mmRevokeGrantPrivilege.mock.funcRevokeGrantPrivilege = f - mmRevokeGrantPrivilege.mock.funcRevokeGrantPrivilegeOrigin = minimock.CallerInfo(1) return mmRevokeGrantPrivilege.mock } @@ -12683,9 +11829,8 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) When(ctx context. } expectation := &ClientMockRevokeGrantPrivilegeExpectation{ - mock: mmRevokeGrantPrivilege.mock, - params: &ClientMockRevokeGrantPrivilegeParams{ctx, serviceID, accessType, database, table, column, granteeUserName, granteeRoleName}, - expectationOrigins: ClientMockRevokeGrantPrivilegeExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmRevokeGrantPrivilege.mock, + params: &ClientMockRevokeGrantPrivilegeParams{ctx, serviceID, accessType, database, table, column, granteeUserName, granteeRoleName}, } mmRevokeGrantPrivilege.expectations = append(mmRevokeGrantPrivilege.expectations, expectation) return expectation @@ -12703,7 +11848,6 @@ func (mmRevokeGrantPrivilege *mClientMockRevokeGrantPrivilege) Times(n uint64) * mmRevokeGrantPrivilege.mock.t.Fatalf("Times of ClientMock.RevokeGrantPrivilege mock can not be zero") } mm_atomic.StoreUint64(&mmRevokeGrantPrivilege.expectedInvocations, n) - mmRevokeGrantPrivilege.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmRevokeGrantPrivilege } @@ -12723,8 +11867,6 @@ func (mmRevokeGrantPrivilege *ClientMock) RevokeGrantPrivilege(ctx context.Conte mm_atomic.AddUint64(&mmRevokeGrantPrivilege.beforeRevokeGrantPrivilegeCounter, 1) defer mm_atomic.AddUint64(&mmRevokeGrantPrivilege.afterRevokeGrantPrivilegeCounter, 1) - mmRevokeGrantPrivilege.t.Helper() - if mmRevokeGrantPrivilege.inspectFuncRevokeGrantPrivilege != nil { mmRevokeGrantPrivilege.inspectFuncRevokeGrantPrivilege(ctx, serviceID, accessType, database, table, column, granteeUserName, granteeRoleName) } @@ -12753,48 +11895,39 @@ func (mmRevokeGrantPrivilege *ClientMock) RevokeGrantPrivilege(ctx context.Conte if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantPrivilege.RevokeGrantPrivilegeMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantPrivilege.RevokeGrantPrivilegeMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.accessType != nil && !minimock.Equal(*mm_want_ptrs.accessType, mm_got.accessType) { - mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter accessType, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantPrivilege.RevokeGrantPrivilegeMock.defaultExpectation.expectationOrigins.originAccessType, *mm_want_ptrs.accessType, mm_got.accessType, minimock.Diff(*mm_want_ptrs.accessType, mm_got.accessType)) + mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter accessType, want: %#v, got: %#v%s\n", *mm_want_ptrs.accessType, mm_got.accessType, minimock.Diff(*mm_want_ptrs.accessType, mm_got.accessType)) } if mm_want_ptrs.database != nil && !minimock.Equal(*mm_want_ptrs.database, mm_got.database) { - mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter database, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantPrivilege.RevokeGrantPrivilegeMock.defaultExpectation.expectationOrigins.originDatabase, *mm_want_ptrs.database, mm_got.database, minimock.Diff(*mm_want_ptrs.database, mm_got.database)) + mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter database, want: %#v, got: %#v%s\n", *mm_want_ptrs.database, mm_got.database, minimock.Diff(*mm_want_ptrs.database, mm_got.database)) } if mm_want_ptrs.table != nil && !minimock.Equal(*mm_want_ptrs.table, mm_got.table) { - mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter table, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantPrivilege.RevokeGrantPrivilegeMock.defaultExpectation.expectationOrigins.originTable, *mm_want_ptrs.table, mm_got.table, minimock.Diff(*mm_want_ptrs.table, mm_got.table)) + mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter table, want: %#v, got: %#v%s\n", *mm_want_ptrs.table, mm_got.table, minimock.Diff(*mm_want_ptrs.table, mm_got.table)) } if mm_want_ptrs.column != nil && !minimock.Equal(*mm_want_ptrs.column, mm_got.column) { - mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter column, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantPrivilege.RevokeGrantPrivilegeMock.defaultExpectation.expectationOrigins.originColumn, *mm_want_ptrs.column, mm_got.column, minimock.Diff(*mm_want_ptrs.column, mm_got.column)) + mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter column, want: %#v, got: %#v%s\n", *mm_want_ptrs.column, mm_got.column, minimock.Diff(*mm_want_ptrs.column, mm_got.column)) } if mm_want_ptrs.granteeUserName != nil && !minimock.Equal(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName) { - mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter granteeUserName, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantPrivilege.RevokeGrantPrivilegeMock.defaultExpectation.expectationOrigins.originGranteeUserName, *mm_want_ptrs.granteeUserName, mm_got.granteeUserName, minimock.Diff(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName)) + mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter granteeUserName, want: %#v, got: %#v%s\n", *mm_want_ptrs.granteeUserName, mm_got.granteeUserName, minimock.Diff(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName)) } if mm_want_ptrs.granteeRoleName != nil && !minimock.Equal(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName) { - mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter granteeRoleName, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantPrivilege.RevokeGrantPrivilegeMock.defaultExpectation.expectationOrigins.originGranteeRoleName, *mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName, minimock.Diff(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName)) + mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameter granteeRoleName, want: %#v, got: %#v%s\n", *mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName, minimock.Diff(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantPrivilege.RevokeGrantPrivilegeMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmRevokeGrantPrivilege.t.Errorf("ClientMock.RevokeGrantPrivilege got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmRevokeGrantPrivilege.RevokeGrantPrivilegeMock.defaultExpectation.results @@ -12854,7 +11987,7 @@ func (m *ClientMock) MinimockRevokeGrantPrivilegeDone() bool { func (m *ClientMock) MinimockRevokeGrantPrivilegeInspect() { for _, e := range m.RevokeGrantPrivilegeMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.RevokeGrantPrivilege at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.RevokeGrantPrivilege with params: %#v", *e.params) } } @@ -12862,19 +11995,19 @@ func (m *ClientMock) MinimockRevokeGrantPrivilegeInspect() { // if default expectation was set then invocations count should be greater than zero if m.RevokeGrantPrivilegeMock.defaultExpectation != nil && afterRevokeGrantPrivilegeCounter < 1 { if m.RevokeGrantPrivilegeMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.RevokeGrantPrivilege at\n%s", m.RevokeGrantPrivilegeMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.RevokeGrantPrivilege") } else { - m.t.Errorf("Expected call to ClientMock.RevokeGrantPrivilege at\n%s with params: %#v", m.RevokeGrantPrivilegeMock.defaultExpectation.expectationOrigins.origin, *m.RevokeGrantPrivilegeMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.RevokeGrantPrivilege with params: %#v", *m.RevokeGrantPrivilegeMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcRevokeGrantPrivilege != nil && afterRevokeGrantPrivilegeCounter < 1 { - m.t.Errorf("Expected call to ClientMock.RevokeGrantPrivilege at\n%s", m.funcRevokeGrantPrivilegeOrigin) + m.t.Error("Expected call to ClientMock.RevokeGrantPrivilege") } if !m.RevokeGrantPrivilegeMock.invocationsDone() && afterRevokeGrantPrivilegeCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.RevokeGrantPrivilege at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.RevokeGrantPrivilegeMock.expectedInvocations), m.RevokeGrantPrivilegeMock.expectedInvocationsOrigin, afterRevokeGrantPrivilegeCounter) + m.t.Errorf("Expected %d calls to ClientMock.RevokeGrantPrivilege but found %d calls", + mm_atomic.LoadUint64(&m.RevokeGrantPrivilegeMock.expectedInvocations), afterRevokeGrantPrivilegeCounter) } } @@ -12887,19 +12020,16 @@ type mClientMockRevokeGrantRole struct { callArgs []*ClientMockRevokeGrantRoleParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockRevokeGrantRoleExpectation specifies expectation struct of the Client.RevokeGrantRole type ClientMockRevokeGrantRoleExpectation struct { - mock *ClientMock - params *ClientMockRevokeGrantRoleParams - paramPtrs *ClientMockRevokeGrantRoleParamPtrs - expectationOrigins ClientMockRevokeGrantRoleExpectationOrigins - results *ClientMockRevokeGrantRoleResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockRevokeGrantRoleParams + paramPtrs *ClientMockRevokeGrantRoleParamPtrs + results *ClientMockRevokeGrantRoleResults + Counter uint64 } // ClientMockRevokeGrantRoleParams contains parameters of the Client.RevokeGrantRole @@ -12925,16 +12055,6 @@ type ClientMockRevokeGrantRoleResults struct { err error } -// ClientMockRevokeGrantRoleOrigins contains origins of expectations of the Client.RevokeGrantRole -type ClientMockRevokeGrantRoleExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originGrantedRoleName string - originGranteeUserName string - originGranteeRoleName string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -12960,7 +12080,6 @@ func (mmRevokeGrantRole *mClientMockRevokeGrantRole) Expect(ctx context.Context, } mmRevokeGrantRole.defaultExpectation.params = &ClientMockRevokeGrantRoleParams{ctx, serviceID, grantedRoleName, granteeUserName, granteeRoleName} - mmRevokeGrantRole.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmRevokeGrantRole.expectations { if minimock.Equal(e.params, mmRevokeGrantRole.defaultExpectation.params) { mmRevokeGrantRole.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmRevokeGrantRole.defaultExpectation.params) @@ -12988,7 +12107,6 @@ func (mmRevokeGrantRole *mClientMockRevokeGrantRole) ExpectCtxParam1(ctx context mmRevokeGrantRole.defaultExpectation.paramPtrs = &ClientMockRevokeGrantRoleParamPtrs{} } mmRevokeGrantRole.defaultExpectation.paramPtrs.ctx = &ctx - mmRevokeGrantRole.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmRevokeGrantRole } @@ -13011,7 +12129,6 @@ func (mmRevokeGrantRole *mClientMockRevokeGrantRole) ExpectServiceIDParam2(servi mmRevokeGrantRole.defaultExpectation.paramPtrs = &ClientMockRevokeGrantRoleParamPtrs{} } mmRevokeGrantRole.defaultExpectation.paramPtrs.serviceID = &serviceID - mmRevokeGrantRole.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmRevokeGrantRole } @@ -13034,7 +12151,6 @@ func (mmRevokeGrantRole *mClientMockRevokeGrantRole) ExpectGrantedRoleNameParam3 mmRevokeGrantRole.defaultExpectation.paramPtrs = &ClientMockRevokeGrantRoleParamPtrs{} } mmRevokeGrantRole.defaultExpectation.paramPtrs.grantedRoleName = &grantedRoleName - mmRevokeGrantRole.defaultExpectation.expectationOrigins.originGrantedRoleName = minimock.CallerInfo(1) return mmRevokeGrantRole } @@ -13057,7 +12173,6 @@ func (mmRevokeGrantRole *mClientMockRevokeGrantRole) ExpectGranteeUserNameParam4 mmRevokeGrantRole.defaultExpectation.paramPtrs = &ClientMockRevokeGrantRoleParamPtrs{} } mmRevokeGrantRole.defaultExpectation.paramPtrs.granteeUserName = &granteeUserName - mmRevokeGrantRole.defaultExpectation.expectationOrigins.originGranteeUserName = minimock.CallerInfo(1) return mmRevokeGrantRole } @@ -13080,7 +12195,6 @@ func (mmRevokeGrantRole *mClientMockRevokeGrantRole) ExpectGranteeRoleNameParam5 mmRevokeGrantRole.defaultExpectation.paramPtrs = &ClientMockRevokeGrantRoleParamPtrs{} } mmRevokeGrantRole.defaultExpectation.paramPtrs.granteeRoleName = &granteeRoleName - mmRevokeGrantRole.defaultExpectation.expectationOrigins.originGranteeRoleName = minimock.CallerInfo(1) return mmRevokeGrantRole } @@ -13106,7 +12220,6 @@ func (mmRevokeGrantRole *mClientMockRevokeGrantRole) Return(err error) *ClientMo mmRevokeGrantRole.defaultExpectation = &ClientMockRevokeGrantRoleExpectation{mock: mmRevokeGrantRole.mock} } mmRevokeGrantRole.defaultExpectation.results = &ClientMockRevokeGrantRoleResults{err} - mmRevokeGrantRole.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmRevokeGrantRole.mock } @@ -13121,7 +12234,6 @@ func (mmRevokeGrantRole *mClientMockRevokeGrantRole) Set(f func(ctx context.Cont } mmRevokeGrantRole.mock.funcRevokeGrantRole = f - mmRevokeGrantRole.mock.funcRevokeGrantRoleOrigin = minimock.CallerInfo(1) return mmRevokeGrantRole.mock } @@ -13133,9 +12245,8 @@ func (mmRevokeGrantRole *mClientMockRevokeGrantRole) When(ctx context.Context, s } expectation := &ClientMockRevokeGrantRoleExpectation{ - mock: mmRevokeGrantRole.mock, - params: &ClientMockRevokeGrantRoleParams{ctx, serviceID, grantedRoleName, granteeUserName, granteeRoleName}, - expectationOrigins: ClientMockRevokeGrantRoleExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmRevokeGrantRole.mock, + params: &ClientMockRevokeGrantRoleParams{ctx, serviceID, grantedRoleName, granteeUserName, granteeRoleName}, } mmRevokeGrantRole.expectations = append(mmRevokeGrantRole.expectations, expectation) return expectation @@ -13153,7 +12264,6 @@ func (mmRevokeGrantRole *mClientMockRevokeGrantRole) Times(n uint64) *mClientMoc mmRevokeGrantRole.mock.t.Fatalf("Times of ClientMock.RevokeGrantRole mock can not be zero") } mm_atomic.StoreUint64(&mmRevokeGrantRole.expectedInvocations, n) - mmRevokeGrantRole.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmRevokeGrantRole } @@ -13173,8 +12283,6 @@ func (mmRevokeGrantRole *ClientMock) RevokeGrantRole(ctx context.Context, servic mm_atomic.AddUint64(&mmRevokeGrantRole.beforeRevokeGrantRoleCounter, 1) defer mm_atomic.AddUint64(&mmRevokeGrantRole.afterRevokeGrantRoleCounter, 1) - mmRevokeGrantRole.t.Helper() - if mmRevokeGrantRole.inspectFuncRevokeGrantRole != nil { mmRevokeGrantRole.inspectFuncRevokeGrantRole(ctx, serviceID, grantedRoleName, granteeUserName, granteeRoleName) } @@ -13203,33 +12311,27 @@ func (mmRevokeGrantRole *ClientMock) RevokeGrantRole(ctx context.Context, servic if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantRole.RevokeGrantRoleMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantRole.RevokeGrantRoleMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.grantedRoleName != nil && !minimock.Equal(*mm_want_ptrs.grantedRoleName, mm_got.grantedRoleName) { - mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameter grantedRoleName, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantRole.RevokeGrantRoleMock.defaultExpectation.expectationOrigins.originGrantedRoleName, *mm_want_ptrs.grantedRoleName, mm_got.grantedRoleName, minimock.Diff(*mm_want_ptrs.grantedRoleName, mm_got.grantedRoleName)) + mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameter grantedRoleName, want: %#v, got: %#v%s\n", *mm_want_ptrs.grantedRoleName, mm_got.grantedRoleName, minimock.Diff(*mm_want_ptrs.grantedRoleName, mm_got.grantedRoleName)) } if mm_want_ptrs.granteeUserName != nil && !minimock.Equal(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName) { - mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameter granteeUserName, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantRole.RevokeGrantRoleMock.defaultExpectation.expectationOrigins.originGranteeUserName, *mm_want_ptrs.granteeUserName, mm_got.granteeUserName, minimock.Diff(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName)) + mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameter granteeUserName, want: %#v, got: %#v%s\n", *mm_want_ptrs.granteeUserName, mm_got.granteeUserName, minimock.Diff(*mm_want_ptrs.granteeUserName, mm_got.granteeUserName)) } if mm_want_ptrs.granteeRoleName != nil && !minimock.Equal(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName) { - mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameter granteeRoleName, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantRole.RevokeGrantRoleMock.defaultExpectation.expectationOrigins.originGranteeRoleName, *mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName, minimock.Diff(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName)) + mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameter granteeRoleName, want: %#v, got: %#v%s\n", *mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName, minimock.Diff(*mm_want_ptrs.granteeRoleName, mm_got.granteeRoleName)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmRevokeGrantRole.RevokeGrantRoleMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmRevokeGrantRole.t.Errorf("ClientMock.RevokeGrantRole got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmRevokeGrantRole.RevokeGrantRoleMock.defaultExpectation.results @@ -13289,7 +12391,7 @@ func (m *ClientMock) MinimockRevokeGrantRoleDone() bool { func (m *ClientMock) MinimockRevokeGrantRoleInspect() { for _, e := range m.RevokeGrantRoleMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.RevokeGrantRole at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.RevokeGrantRole with params: %#v", *e.params) } } @@ -13297,19 +12399,367 @@ func (m *ClientMock) MinimockRevokeGrantRoleInspect() { // if default expectation was set then invocations count should be greater than zero if m.RevokeGrantRoleMock.defaultExpectation != nil && afterRevokeGrantRoleCounter < 1 { if m.RevokeGrantRoleMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.RevokeGrantRole at\n%s", m.RevokeGrantRoleMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.RevokeGrantRole") } else { - m.t.Errorf("Expected call to ClientMock.RevokeGrantRole at\n%s with params: %#v", m.RevokeGrantRoleMock.defaultExpectation.expectationOrigins.origin, *m.RevokeGrantRoleMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.RevokeGrantRole with params: %#v", *m.RevokeGrantRoleMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcRevokeGrantRole != nil && afterRevokeGrantRoleCounter < 1 { - m.t.Errorf("Expected call to ClientMock.RevokeGrantRole at\n%s", m.funcRevokeGrantRoleOrigin) + m.t.Error("Expected call to ClientMock.RevokeGrantRole") } if !m.RevokeGrantRoleMock.invocationsDone() && afterRevokeGrantRoleCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.RevokeGrantRole at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.RevokeGrantRoleMock.expectedInvocations), m.RevokeGrantRoleMock.expectedInvocationsOrigin, afterRevokeGrantRoleCounter) + m.t.Errorf("Expected %d calls to ClientMock.RevokeGrantRole but found %d calls", + mm_atomic.LoadUint64(&m.RevokeGrantRoleMock.expectedInvocations), afterRevokeGrantRoleCounter) + } +} + +type mClientMockRotateTDEKey struct { + optional bool + mock *ClientMock + defaultExpectation *ClientMockRotateTDEKeyExpectation + expectations []*ClientMockRotateTDEKeyExpectation + + callArgs []*ClientMockRotateTDEKeyParams + mutex sync.RWMutex + + expectedInvocations uint64 +} + +// ClientMockRotateTDEKeyExpectation specifies expectation struct of the Client.RotateTDEKey +type ClientMockRotateTDEKeyExpectation struct { + mock *ClientMock + params *ClientMockRotateTDEKeyParams + paramPtrs *ClientMockRotateTDEKeyParamPtrs + results *ClientMockRotateTDEKeyResults + Counter uint64 +} + +// ClientMockRotateTDEKeyParams contains parameters of the Client.RotateTDEKey +type ClientMockRotateTDEKeyParams struct { + ctx context.Context + serviceId string + keyId string +} + +// ClientMockRotateTDEKeyParamPtrs contains pointers to parameters of the Client.RotateTDEKey +type ClientMockRotateTDEKeyParamPtrs struct { + ctx *context.Context + serviceId *string + keyId *string +} + +// ClientMockRotateTDEKeyResults contains results of the Client.RotateTDEKey +type ClientMockRotateTDEKeyResults struct { + err error +} + +// Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning +// the test will fail minimock's automatic final call check if the mocked method was not called at least once. +// Optional() makes method check to work in '0 or more' mode. +// It is NOT RECOMMENDED to use this option unless you really need it, as default behaviour helps to +// catch the problems when the expected method call is totally skipped during test run. +func (mmRotateTDEKey *mClientMockRotateTDEKey) Optional() *mClientMockRotateTDEKey { + mmRotateTDEKey.optional = true + return mmRotateTDEKey +} + +// Expect sets up expected params for Client.RotateTDEKey +func (mmRotateTDEKey *mClientMockRotateTDEKey) Expect(ctx context.Context, serviceId string, keyId string) *mClientMockRotateTDEKey { + if mmRotateTDEKey.mock.funcRotateTDEKey != nil { + mmRotateTDEKey.mock.t.Fatalf("ClientMock.RotateTDEKey mock is already set by Set") + } + + if mmRotateTDEKey.defaultExpectation == nil { + mmRotateTDEKey.defaultExpectation = &ClientMockRotateTDEKeyExpectation{} + } + + if mmRotateTDEKey.defaultExpectation.paramPtrs != nil { + mmRotateTDEKey.mock.t.Fatalf("ClientMock.RotateTDEKey mock is already set by ExpectParams functions") + } + + mmRotateTDEKey.defaultExpectation.params = &ClientMockRotateTDEKeyParams{ctx, serviceId, keyId} + for _, e := range mmRotateTDEKey.expectations { + if minimock.Equal(e.params, mmRotateTDEKey.defaultExpectation.params) { + mmRotateTDEKey.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmRotateTDEKey.defaultExpectation.params) + } + } + + return mmRotateTDEKey +} + +// ExpectCtxParam1 sets up expected param ctx for Client.RotateTDEKey +func (mmRotateTDEKey *mClientMockRotateTDEKey) ExpectCtxParam1(ctx context.Context) *mClientMockRotateTDEKey { + if mmRotateTDEKey.mock.funcRotateTDEKey != nil { + mmRotateTDEKey.mock.t.Fatalf("ClientMock.RotateTDEKey mock is already set by Set") + } + + if mmRotateTDEKey.defaultExpectation == nil { + mmRotateTDEKey.defaultExpectation = &ClientMockRotateTDEKeyExpectation{} + } + + if mmRotateTDEKey.defaultExpectation.params != nil { + mmRotateTDEKey.mock.t.Fatalf("ClientMock.RotateTDEKey mock is already set by Expect") + } + + if mmRotateTDEKey.defaultExpectation.paramPtrs == nil { + mmRotateTDEKey.defaultExpectation.paramPtrs = &ClientMockRotateTDEKeyParamPtrs{} + } + mmRotateTDEKey.defaultExpectation.paramPtrs.ctx = &ctx + + return mmRotateTDEKey +} + +// ExpectServiceIdParam2 sets up expected param serviceId for Client.RotateTDEKey +func (mmRotateTDEKey *mClientMockRotateTDEKey) ExpectServiceIdParam2(serviceId string) *mClientMockRotateTDEKey { + if mmRotateTDEKey.mock.funcRotateTDEKey != nil { + mmRotateTDEKey.mock.t.Fatalf("ClientMock.RotateTDEKey mock is already set by Set") + } + + if mmRotateTDEKey.defaultExpectation == nil { + mmRotateTDEKey.defaultExpectation = &ClientMockRotateTDEKeyExpectation{} + } + + if mmRotateTDEKey.defaultExpectation.params != nil { + mmRotateTDEKey.mock.t.Fatalf("ClientMock.RotateTDEKey mock is already set by Expect") + } + + if mmRotateTDEKey.defaultExpectation.paramPtrs == nil { + mmRotateTDEKey.defaultExpectation.paramPtrs = &ClientMockRotateTDEKeyParamPtrs{} + } + mmRotateTDEKey.defaultExpectation.paramPtrs.serviceId = &serviceId + + return mmRotateTDEKey +} + +// ExpectKeyIdParam3 sets up expected param keyId for Client.RotateTDEKey +func (mmRotateTDEKey *mClientMockRotateTDEKey) ExpectKeyIdParam3(keyId string) *mClientMockRotateTDEKey { + if mmRotateTDEKey.mock.funcRotateTDEKey != nil { + mmRotateTDEKey.mock.t.Fatalf("ClientMock.RotateTDEKey mock is already set by Set") + } + + if mmRotateTDEKey.defaultExpectation == nil { + mmRotateTDEKey.defaultExpectation = &ClientMockRotateTDEKeyExpectation{} + } + + if mmRotateTDEKey.defaultExpectation.params != nil { + mmRotateTDEKey.mock.t.Fatalf("ClientMock.RotateTDEKey mock is already set by Expect") + } + + if mmRotateTDEKey.defaultExpectation.paramPtrs == nil { + mmRotateTDEKey.defaultExpectation.paramPtrs = &ClientMockRotateTDEKeyParamPtrs{} + } + mmRotateTDEKey.defaultExpectation.paramPtrs.keyId = &keyId + + return mmRotateTDEKey +} + +// Inspect accepts an inspector function that has same arguments as the Client.RotateTDEKey +func (mmRotateTDEKey *mClientMockRotateTDEKey) Inspect(f func(ctx context.Context, serviceId string, keyId string)) *mClientMockRotateTDEKey { + if mmRotateTDEKey.mock.inspectFuncRotateTDEKey != nil { + mmRotateTDEKey.mock.t.Fatalf("Inspect function is already set for ClientMock.RotateTDEKey") + } + + mmRotateTDEKey.mock.inspectFuncRotateTDEKey = f + + return mmRotateTDEKey +} + +// Return sets up results that will be returned by Client.RotateTDEKey +func (mmRotateTDEKey *mClientMockRotateTDEKey) Return(err error) *ClientMock { + if mmRotateTDEKey.mock.funcRotateTDEKey != nil { + mmRotateTDEKey.mock.t.Fatalf("ClientMock.RotateTDEKey mock is already set by Set") + } + + if mmRotateTDEKey.defaultExpectation == nil { + mmRotateTDEKey.defaultExpectation = &ClientMockRotateTDEKeyExpectation{mock: mmRotateTDEKey.mock} + } + mmRotateTDEKey.defaultExpectation.results = &ClientMockRotateTDEKeyResults{err} + return mmRotateTDEKey.mock +} + +// Set uses given function f to mock the Client.RotateTDEKey method +func (mmRotateTDEKey *mClientMockRotateTDEKey) Set(f func(ctx context.Context, serviceId string, keyId string) (err error)) *ClientMock { + if mmRotateTDEKey.defaultExpectation != nil { + mmRotateTDEKey.mock.t.Fatalf("Default expectation is already set for the Client.RotateTDEKey method") + } + + if len(mmRotateTDEKey.expectations) > 0 { + mmRotateTDEKey.mock.t.Fatalf("Some expectations are already set for the Client.RotateTDEKey method") + } + + mmRotateTDEKey.mock.funcRotateTDEKey = f + return mmRotateTDEKey.mock +} + +// When sets expectation for the Client.RotateTDEKey which will trigger the result defined by the following +// Then helper +func (mmRotateTDEKey *mClientMockRotateTDEKey) When(ctx context.Context, serviceId string, keyId string) *ClientMockRotateTDEKeyExpectation { + if mmRotateTDEKey.mock.funcRotateTDEKey != nil { + mmRotateTDEKey.mock.t.Fatalf("ClientMock.RotateTDEKey mock is already set by Set") + } + + expectation := &ClientMockRotateTDEKeyExpectation{ + mock: mmRotateTDEKey.mock, + params: &ClientMockRotateTDEKeyParams{ctx, serviceId, keyId}, + } + mmRotateTDEKey.expectations = append(mmRotateTDEKey.expectations, expectation) + return expectation +} + +// Then sets up Client.RotateTDEKey return parameters for the expectation previously defined by the When method +func (e *ClientMockRotateTDEKeyExpectation) Then(err error) *ClientMock { + e.results = &ClientMockRotateTDEKeyResults{err} + return e.mock +} + +// Times sets number of times Client.RotateTDEKey should be invoked +func (mmRotateTDEKey *mClientMockRotateTDEKey) Times(n uint64) *mClientMockRotateTDEKey { + if n == 0 { + mmRotateTDEKey.mock.t.Fatalf("Times of ClientMock.RotateTDEKey mock can not be zero") + } + mm_atomic.StoreUint64(&mmRotateTDEKey.expectedInvocations, n) + return mmRotateTDEKey +} + +func (mmRotateTDEKey *mClientMockRotateTDEKey) invocationsDone() bool { + if len(mmRotateTDEKey.expectations) == 0 && mmRotateTDEKey.defaultExpectation == nil && mmRotateTDEKey.mock.funcRotateTDEKey == nil { + return true + } + + totalInvocations := mm_atomic.LoadUint64(&mmRotateTDEKey.mock.afterRotateTDEKeyCounter) + expectedInvocations := mm_atomic.LoadUint64(&mmRotateTDEKey.expectedInvocations) + + return totalInvocations > 0 && (expectedInvocations == 0 || expectedInvocations == totalInvocations) +} + +// RotateTDEKey implements Client +func (mmRotateTDEKey *ClientMock) RotateTDEKey(ctx context.Context, serviceId string, keyId string) (err error) { + mm_atomic.AddUint64(&mmRotateTDEKey.beforeRotateTDEKeyCounter, 1) + defer mm_atomic.AddUint64(&mmRotateTDEKey.afterRotateTDEKeyCounter, 1) + + if mmRotateTDEKey.inspectFuncRotateTDEKey != nil { + mmRotateTDEKey.inspectFuncRotateTDEKey(ctx, serviceId, keyId) + } + + mm_params := ClientMockRotateTDEKeyParams{ctx, serviceId, keyId} + + // Record call args + mmRotateTDEKey.RotateTDEKeyMock.mutex.Lock() + mmRotateTDEKey.RotateTDEKeyMock.callArgs = append(mmRotateTDEKey.RotateTDEKeyMock.callArgs, &mm_params) + mmRotateTDEKey.RotateTDEKeyMock.mutex.Unlock() + + for _, e := range mmRotateTDEKey.RotateTDEKeyMock.expectations { + if minimock.Equal(*e.params, mm_params) { + mm_atomic.AddUint64(&e.Counter, 1) + return e.results.err + } + } + + if mmRotateTDEKey.RotateTDEKeyMock.defaultExpectation != nil { + mm_atomic.AddUint64(&mmRotateTDEKey.RotateTDEKeyMock.defaultExpectation.Counter, 1) + mm_want := mmRotateTDEKey.RotateTDEKeyMock.defaultExpectation.params + mm_want_ptrs := mmRotateTDEKey.RotateTDEKeyMock.defaultExpectation.paramPtrs + + mm_got := ClientMockRotateTDEKeyParams{ctx, serviceId, keyId} + + if mm_want_ptrs != nil { + + if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { + mmRotateTDEKey.t.Errorf("ClientMock.RotateTDEKey got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + } + + if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { + mmRotateTDEKey.t.Errorf("ClientMock.RotateTDEKey got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + } + + if mm_want_ptrs.keyId != nil && !minimock.Equal(*mm_want_ptrs.keyId, mm_got.keyId) { + mmRotateTDEKey.t.Errorf("ClientMock.RotateTDEKey got unexpected parameter keyId, want: %#v, got: %#v%s\n", *mm_want_ptrs.keyId, mm_got.keyId, minimock.Diff(*mm_want_ptrs.keyId, mm_got.keyId)) + } + + } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { + mmRotateTDEKey.t.Errorf("ClientMock.RotateTDEKey got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + } + + mm_results := mmRotateTDEKey.RotateTDEKeyMock.defaultExpectation.results + if mm_results == nil { + mmRotateTDEKey.t.Fatal("No results are set for the ClientMock.RotateTDEKey") + } + return (*mm_results).err + } + if mmRotateTDEKey.funcRotateTDEKey != nil { + return mmRotateTDEKey.funcRotateTDEKey(ctx, serviceId, keyId) + } + mmRotateTDEKey.t.Fatalf("Unexpected call to ClientMock.RotateTDEKey. %v %v %v", ctx, serviceId, keyId) + return +} + +// RotateTDEKeyAfterCounter returns a count of finished ClientMock.RotateTDEKey invocations +func (mmRotateTDEKey *ClientMock) RotateTDEKeyAfterCounter() uint64 { + return mm_atomic.LoadUint64(&mmRotateTDEKey.afterRotateTDEKeyCounter) +} + +// RotateTDEKeyBeforeCounter returns a count of ClientMock.RotateTDEKey invocations +func (mmRotateTDEKey *ClientMock) RotateTDEKeyBeforeCounter() uint64 { + return mm_atomic.LoadUint64(&mmRotateTDEKey.beforeRotateTDEKeyCounter) +} + +// Calls returns a list of arguments used in each call to ClientMock.RotateTDEKey. +// The list is in the same order as the calls were made (i.e. recent calls have a higher index) +func (mmRotateTDEKey *mClientMockRotateTDEKey) Calls() []*ClientMockRotateTDEKeyParams { + mmRotateTDEKey.mutex.RLock() + + argCopy := make([]*ClientMockRotateTDEKeyParams, len(mmRotateTDEKey.callArgs)) + copy(argCopy, mmRotateTDEKey.callArgs) + + mmRotateTDEKey.mutex.RUnlock() + + return argCopy +} + +// MinimockRotateTDEKeyDone returns true if the count of the RotateTDEKey invocations corresponds +// the number of defined expectations +func (m *ClientMock) MinimockRotateTDEKeyDone() bool { + if m.RotateTDEKeyMock.optional { + // Optional methods provide '0 or more' call count restriction. + return true + } + + for _, e := range m.RotateTDEKeyMock.expectations { + if mm_atomic.LoadUint64(&e.Counter) < 1 { + return false + } + } + + return m.RotateTDEKeyMock.invocationsDone() +} + +// MinimockRotateTDEKeyInspect logs each unmet expectation +func (m *ClientMock) MinimockRotateTDEKeyInspect() { + for _, e := range m.RotateTDEKeyMock.expectations { + if mm_atomic.LoadUint64(&e.Counter) < 1 { + m.t.Errorf("Expected call to ClientMock.RotateTDEKey with params: %#v", *e.params) + } + } + + afterRotateTDEKeyCounter := mm_atomic.LoadUint64(&m.afterRotateTDEKeyCounter) + // if default expectation was set then invocations count should be greater than zero + if m.RotateTDEKeyMock.defaultExpectation != nil && afterRotateTDEKeyCounter < 1 { + if m.RotateTDEKeyMock.defaultExpectation.params == nil { + m.t.Error("Expected call to ClientMock.RotateTDEKey") + } else { + m.t.Errorf("Expected call to ClientMock.RotateTDEKey with params: %#v", *m.RotateTDEKeyMock.defaultExpectation.params) + } + } + // if func was set then invocations count should be greater than zero + if m.funcRotateTDEKey != nil && afterRotateTDEKeyCounter < 1 { + m.t.Error("Expected call to ClientMock.RotateTDEKey") + } + + if !m.RotateTDEKeyMock.invocationsDone() && afterRotateTDEKeyCounter > 0 { + m.t.Errorf("Expected %d calls to ClientMock.RotateTDEKey but found %d calls", + mm_atomic.LoadUint64(&m.RotateTDEKeyMock.expectedInvocations), afterRotateTDEKeyCounter) } } @@ -13322,19 +12772,16 @@ type mClientMockScalingClickPipe struct { callArgs []*ClientMockScalingClickPipeParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockScalingClickPipeExpectation specifies expectation struct of the Client.ScalingClickPipe type ClientMockScalingClickPipeExpectation struct { - mock *ClientMock - params *ClientMockScalingClickPipeParams - paramPtrs *ClientMockScalingClickPipeParamPtrs - expectationOrigins ClientMockScalingClickPipeExpectationOrigins - results *ClientMockScalingClickPipeResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockScalingClickPipeParams + paramPtrs *ClientMockScalingClickPipeParamPtrs + results *ClientMockScalingClickPipeResults + Counter uint64 } // ClientMockScalingClickPipeParams contains parameters of the Client.ScalingClickPipe @@ -13359,15 +12806,6 @@ type ClientMockScalingClickPipeResults struct { err error } -// ClientMockScalingClickPipeOrigins contains origins of expectations of the Client.ScalingClickPipe -type ClientMockScalingClickPipeExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originClickPipeId string - originRequest string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -13393,7 +12831,6 @@ func (mmScalingClickPipe *mClientMockScalingClickPipe) Expect(ctx context.Contex } mmScalingClickPipe.defaultExpectation.params = &ClientMockScalingClickPipeParams{ctx, serviceId, clickPipeId, request} - mmScalingClickPipe.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmScalingClickPipe.expectations { if minimock.Equal(e.params, mmScalingClickPipe.defaultExpectation.params) { mmScalingClickPipe.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmScalingClickPipe.defaultExpectation.params) @@ -13421,7 +12858,6 @@ func (mmScalingClickPipe *mClientMockScalingClickPipe) ExpectCtxParam1(ctx conte mmScalingClickPipe.defaultExpectation.paramPtrs = &ClientMockScalingClickPipeParamPtrs{} } mmScalingClickPipe.defaultExpectation.paramPtrs.ctx = &ctx - mmScalingClickPipe.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmScalingClickPipe } @@ -13444,7 +12880,6 @@ func (mmScalingClickPipe *mClientMockScalingClickPipe) ExpectServiceIdParam2(ser mmScalingClickPipe.defaultExpectation.paramPtrs = &ClientMockScalingClickPipeParamPtrs{} } mmScalingClickPipe.defaultExpectation.paramPtrs.serviceId = &serviceId - mmScalingClickPipe.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmScalingClickPipe } @@ -13467,7 +12902,6 @@ func (mmScalingClickPipe *mClientMockScalingClickPipe) ExpectClickPipeIdParam3(c mmScalingClickPipe.defaultExpectation.paramPtrs = &ClientMockScalingClickPipeParamPtrs{} } mmScalingClickPipe.defaultExpectation.paramPtrs.clickPipeId = &clickPipeId - mmScalingClickPipe.defaultExpectation.expectationOrigins.originClickPipeId = minimock.CallerInfo(1) return mmScalingClickPipe } @@ -13490,7 +12924,6 @@ func (mmScalingClickPipe *mClientMockScalingClickPipe) ExpectRequestParam4(reque mmScalingClickPipe.defaultExpectation.paramPtrs = &ClientMockScalingClickPipeParamPtrs{} } mmScalingClickPipe.defaultExpectation.paramPtrs.request = &request - mmScalingClickPipe.defaultExpectation.expectationOrigins.originRequest = minimock.CallerInfo(1) return mmScalingClickPipe } @@ -13516,7 +12949,6 @@ func (mmScalingClickPipe *mClientMockScalingClickPipe) Return(cp1 *ClickPipe, er mmScalingClickPipe.defaultExpectation = &ClientMockScalingClickPipeExpectation{mock: mmScalingClickPipe.mock} } mmScalingClickPipe.defaultExpectation.results = &ClientMockScalingClickPipeResults{cp1, err} - mmScalingClickPipe.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmScalingClickPipe.mock } @@ -13531,7 +12963,6 @@ func (mmScalingClickPipe *mClientMockScalingClickPipe) Set(f func(ctx context.Co } mmScalingClickPipe.mock.funcScalingClickPipe = f - mmScalingClickPipe.mock.funcScalingClickPipeOrigin = minimock.CallerInfo(1) return mmScalingClickPipe.mock } @@ -13543,9 +12974,8 @@ func (mmScalingClickPipe *mClientMockScalingClickPipe) When(ctx context.Context, } expectation := &ClientMockScalingClickPipeExpectation{ - mock: mmScalingClickPipe.mock, - params: &ClientMockScalingClickPipeParams{ctx, serviceId, clickPipeId, request}, - expectationOrigins: ClientMockScalingClickPipeExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmScalingClickPipe.mock, + params: &ClientMockScalingClickPipeParams{ctx, serviceId, clickPipeId, request}, } mmScalingClickPipe.expectations = append(mmScalingClickPipe.expectations, expectation) return expectation @@ -13563,7 +12993,6 @@ func (mmScalingClickPipe *mClientMockScalingClickPipe) Times(n uint64) *mClientM mmScalingClickPipe.mock.t.Fatalf("Times of ClientMock.ScalingClickPipe mock can not be zero") } mm_atomic.StoreUint64(&mmScalingClickPipe.expectedInvocations, n) - mmScalingClickPipe.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmScalingClickPipe } @@ -13583,8 +13012,6 @@ func (mmScalingClickPipe *ClientMock) ScalingClickPipe(ctx context.Context, serv mm_atomic.AddUint64(&mmScalingClickPipe.beforeScalingClickPipeCounter, 1) defer mm_atomic.AddUint64(&mmScalingClickPipe.afterScalingClickPipeCounter, 1) - mmScalingClickPipe.t.Helper() - if mmScalingClickPipe.inspectFuncScalingClickPipe != nil { mmScalingClickPipe.inspectFuncScalingClickPipe(ctx, serviceId, clickPipeId, request) } @@ -13613,28 +13040,23 @@ func (mmScalingClickPipe *ClientMock) ScalingClickPipe(ctx context.Context, serv if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmScalingClickPipe.t.Errorf("ClientMock.ScalingClickPipe got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmScalingClickPipe.ScalingClickPipeMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmScalingClickPipe.t.Errorf("ClientMock.ScalingClickPipe got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmScalingClickPipe.t.Errorf("ClientMock.ScalingClickPipe got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmScalingClickPipe.ScalingClickPipeMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmScalingClickPipe.t.Errorf("ClientMock.ScalingClickPipe got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.clickPipeId != nil && !minimock.Equal(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId) { - mmScalingClickPipe.t.Errorf("ClientMock.ScalingClickPipe got unexpected parameter clickPipeId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmScalingClickPipe.ScalingClickPipeMock.defaultExpectation.expectationOrigins.originClickPipeId, *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) + mmScalingClickPipe.t.Errorf("ClientMock.ScalingClickPipe got unexpected parameter clickPipeId, want: %#v, got: %#v%s\n", *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) } if mm_want_ptrs.request != nil && !minimock.Equal(*mm_want_ptrs.request, mm_got.request) { - mmScalingClickPipe.t.Errorf("ClientMock.ScalingClickPipe got unexpected parameter request, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmScalingClickPipe.ScalingClickPipeMock.defaultExpectation.expectationOrigins.originRequest, *mm_want_ptrs.request, mm_got.request, minimock.Diff(*mm_want_ptrs.request, mm_got.request)) + mmScalingClickPipe.t.Errorf("ClientMock.ScalingClickPipe got unexpected parameter request, want: %#v, got: %#v%s\n", *mm_want_ptrs.request, mm_got.request, minimock.Diff(*mm_want_ptrs.request, mm_got.request)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmScalingClickPipe.t.Errorf("ClientMock.ScalingClickPipe got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmScalingClickPipe.ScalingClickPipeMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmScalingClickPipe.t.Errorf("ClientMock.ScalingClickPipe got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmScalingClickPipe.ScalingClickPipeMock.defaultExpectation.results @@ -13694,7 +13116,7 @@ func (m *ClientMock) MinimockScalingClickPipeDone() bool { func (m *ClientMock) MinimockScalingClickPipeInspect() { for _, e := range m.ScalingClickPipeMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.ScalingClickPipe at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.ScalingClickPipe with params: %#v", *e.params) } } @@ -13702,19 +13124,19 @@ func (m *ClientMock) MinimockScalingClickPipeInspect() { // if default expectation was set then invocations count should be greater than zero if m.ScalingClickPipeMock.defaultExpectation != nil && afterScalingClickPipeCounter < 1 { if m.ScalingClickPipeMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.ScalingClickPipe at\n%s", m.ScalingClickPipeMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.ScalingClickPipe") } else { - m.t.Errorf("Expected call to ClientMock.ScalingClickPipe at\n%s with params: %#v", m.ScalingClickPipeMock.defaultExpectation.expectationOrigins.origin, *m.ScalingClickPipeMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.ScalingClickPipe with params: %#v", *m.ScalingClickPipeMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcScalingClickPipe != nil && afterScalingClickPipeCounter < 1 { - m.t.Errorf("Expected call to ClientMock.ScalingClickPipe at\n%s", m.funcScalingClickPipeOrigin) + m.t.Error("Expected call to ClientMock.ScalingClickPipe") } if !m.ScalingClickPipeMock.invocationsDone() && afterScalingClickPipeCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.ScalingClickPipe at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.ScalingClickPipeMock.expectedInvocations), m.ScalingClickPipeMock.expectedInvocationsOrigin, afterScalingClickPipeCounter) + m.t.Errorf("Expected %d calls to ClientMock.ScalingClickPipe but found %d calls", + mm_atomic.LoadUint64(&m.ScalingClickPipeMock.expectedInvocations), afterScalingClickPipeCounter) } } @@ -13727,19 +13149,16 @@ type mClientMockSyncDatabase struct { callArgs []*ClientMockSyncDatabaseParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockSyncDatabaseExpectation specifies expectation struct of the Client.SyncDatabase type ClientMockSyncDatabaseExpectation struct { - mock *ClientMock - params *ClientMockSyncDatabaseParams - paramPtrs *ClientMockSyncDatabaseParamPtrs - expectationOrigins ClientMockSyncDatabaseExpectationOrigins - results *ClientMockSyncDatabaseResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockSyncDatabaseParams + paramPtrs *ClientMockSyncDatabaseParamPtrs + results *ClientMockSyncDatabaseResults + Counter uint64 } // ClientMockSyncDatabaseParams contains parameters of the Client.SyncDatabase @@ -13761,14 +13180,6 @@ type ClientMockSyncDatabaseResults struct { err error } -// ClientMockSyncDatabaseOrigins contains origins of expectations of the Client.SyncDatabase -type ClientMockSyncDatabaseExpectationOrigins struct { - origin string - originCtx string - originServiceID string - originDb string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -13794,7 +13205,6 @@ func (mmSyncDatabase *mClientMockSyncDatabase) Expect(ctx context.Context, servi } mmSyncDatabase.defaultExpectation.params = &ClientMockSyncDatabaseParams{ctx, serviceID, db} - mmSyncDatabase.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmSyncDatabase.expectations { if minimock.Equal(e.params, mmSyncDatabase.defaultExpectation.params) { mmSyncDatabase.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmSyncDatabase.defaultExpectation.params) @@ -13822,7 +13232,6 @@ func (mmSyncDatabase *mClientMockSyncDatabase) ExpectCtxParam1(ctx context.Conte mmSyncDatabase.defaultExpectation.paramPtrs = &ClientMockSyncDatabaseParamPtrs{} } mmSyncDatabase.defaultExpectation.paramPtrs.ctx = &ctx - mmSyncDatabase.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmSyncDatabase } @@ -13845,7 +13254,6 @@ func (mmSyncDatabase *mClientMockSyncDatabase) ExpectServiceIDParam2(serviceID s mmSyncDatabase.defaultExpectation.paramPtrs = &ClientMockSyncDatabaseParamPtrs{} } mmSyncDatabase.defaultExpectation.paramPtrs.serviceID = &serviceID - mmSyncDatabase.defaultExpectation.expectationOrigins.originServiceID = minimock.CallerInfo(1) return mmSyncDatabase } @@ -13868,7 +13276,6 @@ func (mmSyncDatabase *mClientMockSyncDatabase) ExpectDbParam3(db Database) *mCli mmSyncDatabase.defaultExpectation.paramPtrs = &ClientMockSyncDatabaseParamPtrs{} } mmSyncDatabase.defaultExpectation.paramPtrs.db = &db - mmSyncDatabase.defaultExpectation.expectationOrigins.originDb = minimock.CallerInfo(1) return mmSyncDatabase } @@ -13894,7 +13301,6 @@ func (mmSyncDatabase *mClientMockSyncDatabase) Return(err error) *ClientMock { mmSyncDatabase.defaultExpectation = &ClientMockSyncDatabaseExpectation{mock: mmSyncDatabase.mock} } mmSyncDatabase.defaultExpectation.results = &ClientMockSyncDatabaseResults{err} - mmSyncDatabase.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmSyncDatabase.mock } @@ -13909,7 +13315,6 @@ func (mmSyncDatabase *mClientMockSyncDatabase) Set(f func(ctx context.Context, s } mmSyncDatabase.mock.funcSyncDatabase = f - mmSyncDatabase.mock.funcSyncDatabaseOrigin = minimock.CallerInfo(1) return mmSyncDatabase.mock } @@ -13921,9 +13326,8 @@ func (mmSyncDatabase *mClientMockSyncDatabase) When(ctx context.Context, service } expectation := &ClientMockSyncDatabaseExpectation{ - mock: mmSyncDatabase.mock, - params: &ClientMockSyncDatabaseParams{ctx, serviceID, db}, - expectationOrigins: ClientMockSyncDatabaseExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmSyncDatabase.mock, + params: &ClientMockSyncDatabaseParams{ctx, serviceID, db}, } mmSyncDatabase.expectations = append(mmSyncDatabase.expectations, expectation) return expectation @@ -13941,7 +13345,6 @@ func (mmSyncDatabase *mClientMockSyncDatabase) Times(n uint64) *mClientMockSyncD mmSyncDatabase.mock.t.Fatalf("Times of ClientMock.SyncDatabase mock can not be zero") } mm_atomic.StoreUint64(&mmSyncDatabase.expectedInvocations, n) - mmSyncDatabase.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmSyncDatabase } @@ -13961,8 +13364,6 @@ func (mmSyncDatabase *ClientMock) SyncDatabase(ctx context.Context, serviceID st mm_atomic.AddUint64(&mmSyncDatabase.beforeSyncDatabaseCounter, 1) defer mm_atomic.AddUint64(&mmSyncDatabase.afterSyncDatabaseCounter, 1) - mmSyncDatabase.t.Helper() - if mmSyncDatabase.inspectFuncSyncDatabase != nil { mmSyncDatabase.inspectFuncSyncDatabase(ctx, serviceID, db) } @@ -13991,23 +13392,19 @@ func (mmSyncDatabase *ClientMock) SyncDatabase(ctx context.Context, serviceID st if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmSyncDatabase.t.Errorf("ClientMock.SyncDatabase got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmSyncDatabase.SyncDatabaseMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmSyncDatabase.t.Errorf("ClientMock.SyncDatabase got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceID != nil && !minimock.Equal(*mm_want_ptrs.serviceID, mm_got.serviceID) { - mmSyncDatabase.t.Errorf("ClientMock.SyncDatabase got unexpected parameter serviceID, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmSyncDatabase.SyncDatabaseMock.defaultExpectation.expectationOrigins.originServiceID, *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) + mmSyncDatabase.t.Errorf("ClientMock.SyncDatabase got unexpected parameter serviceID, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceID, mm_got.serviceID, minimock.Diff(*mm_want_ptrs.serviceID, mm_got.serviceID)) } if mm_want_ptrs.db != nil && !minimock.Equal(*mm_want_ptrs.db, mm_got.db) { - mmSyncDatabase.t.Errorf("ClientMock.SyncDatabase got unexpected parameter db, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmSyncDatabase.SyncDatabaseMock.defaultExpectation.expectationOrigins.originDb, *mm_want_ptrs.db, mm_got.db, minimock.Diff(*mm_want_ptrs.db, mm_got.db)) + mmSyncDatabase.t.Errorf("ClientMock.SyncDatabase got unexpected parameter db, want: %#v, got: %#v%s\n", *mm_want_ptrs.db, mm_got.db, minimock.Diff(*mm_want_ptrs.db, mm_got.db)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmSyncDatabase.t.Errorf("ClientMock.SyncDatabase got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmSyncDatabase.SyncDatabaseMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmSyncDatabase.t.Errorf("ClientMock.SyncDatabase got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmSyncDatabase.SyncDatabaseMock.defaultExpectation.results @@ -14067,7 +13464,7 @@ func (m *ClientMock) MinimockSyncDatabaseDone() bool { func (m *ClientMock) MinimockSyncDatabaseInspect() { for _, e := range m.SyncDatabaseMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.SyncDatabase at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.SyncDatabase with params: %#v", *e.params) } } @@ -14075,19 +13472,19 @@ func (m *ClientMock) MinimockSyncDatabaseInspect() { // if default expectation was set then invocations count should be greater than zero if m.SyncDatabaseMock.defaultExpectation != nil && afterSyncDatabaseCounter < 1 { if m.SyncDatabaseMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.SyncDatabase at\n%s", m.SyncDatabaseMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.SyncDatabase") } else { - m.t.Errorf("Expected call to ClientMock.SyncDatabase at\n%s with params: %#v", m.SyncDatabaseMock.defaultExpectation.expectationOrigins.origin, *m.SyncDatabaseMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.SyncDatabase with params: %#v", *m.SyncDatabaseMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcSyncDatabase != nil && afterSyncDatabaseCounter < 1 { - m.t.Errorf("Expected call to ClientMock.SyncDatabase at\n%s", m.funcSyncDatabaseOrigin) + m.t.Error("Expected call to ClientMock.SyncDatabase") } if !m.SyncDatabaseMock.invocationsDone() && afterSyncDatabaseCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.SyncDatabase at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.SyncDatabaseMock.expectedInvocations), m.SyncDatabaseMock.expectedInvocationsOrigin, afterSyncDatabaseCounter) + m.t.Errorf("Expected %d calls to ClientMock.SyncDatabase but found %d calls", + mm_atomic.LoadUint64(&m.SyncDatabaseMock.expectedInvocations), afterSyncDatabaseCounter) } } @@ -14100,19 +13497,16 @@ type mClientMockUpdateBackupConfiguration struct { callArgs []*ClientMockUpdateBackupConfigurationParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockUpdateBackupConfigurationExpectation specifies expectation struct of the Client.UpdateBackupConfiguration type ClientMockUpdateBackupConfigurationExpectation struct { - mock *ClientMock - params *ClientMockUpdateBackupConfigurationParams - paramPtrs *ClientMockUpdateBackupConfigurationParamPtrs - expectationOrigins ClientMockUpdateBackupConfigurationExpectationOrigins - results *ClientMockUpdateBackupConfigurationResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockUpdateBackupConfigurationParams + paramPtrs *ClientMockUpdateBackupConfigurationParamPtrs + results *ClientMockUpdateBackupConfigurationResults + Counter uint64 } // ClientMockUpdateBackupConfigurationParams contains parameters of the Client.UpdateBackupConfiguration @@ -14135,14 +13529,6 @@ type ClientMockUpdateBackupConfigurationResults struct { err error } -// ClientMockUpdateBackupConfigurationOrigins contains origins of expectations of the Client.UpdateBackupConfiguration -type ClientMockUpdateBackupConfigurationExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originB string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -14168,7 +13554,6 @@ func (mmUpdateBackupConfiguration *mClientMockUpdateBackupConfiguration) Expect( } mmUpdateBackupConfiguration.defaultExpectation.params = &ClientMockUpdateBackupConfigurationParams{ctx, serviceId, b} - mmUpdateBackupConfiguration.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmUpdateBackupConfiguration.expectations { if minimock.Equal(e.params, mmUpdateBackupConfiguration.defaultExpectation.params) { mmUpdateBackupConfiguration.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmUpdateBackupConfiguration.defaultExpectation.params) @@ -14196,7 +13581,6 @@ func (mmUpdateBackupConfiguration *mClientMockUpdateBackupConfiguration) ExpectC mmUpdateBackupConfiguration.defaultExpectation.paramPtrs = &ClientMockUpdateBackupConfigurationParamPtrs{} } mmUpdateBackupConfiguration.defaultExpectation.paramPtrs.ctx = &ctx - mmUpdateBackupConfiguration.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmUpdateBackupConfiguration } @@ -14219,7 +13603,6 @@ func (mmUpdateBackupConfiguration *mClientMockUpdateBackupConfiguration) ExpectS mmUpdateBackupConfiguration.defaultExpectation.paramPtrs = &ClientMockUpdateBackupConfigurationParamPtrs{} } mmUpdateBackupConfiguration.defaultExpectation.paramPtrs.serviceId = &serviceId - mmUpdateBackupConfiguration.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmUpdateBackupConfiguration } @@ -14242,7 +13625,6 @@ func (mmUpdateBackupConfiguration *mClientMockUpdateBackupConfiguration) ExpectB mmUpdateBackupConfiguration.defaultExpectation.paramPtrs = &ClientMockUpdateBackupConfigurationParamPtrs{} } mmUpdateBackupConfiguration.defaultExpectation.paramPtrs.b = &b - mmUpdateBackupConfiguration.defaultExpectation.expectationOrigins.originB = minimock.CallerInfo(1) return mmUpdateBackupConfiguration } @@ -14268,7 +13650,6 @@ func (mmUpdateBackupConfiguration *mClientMockUpdateBackupConfiguration) Return( mmUpdateBackupConfiguration.defaultExpectation = &ClientMockUpdateBackupConfigurationExpectation{mock: mmUpdateBackupConfiguration.mock} } mmUpdateBackupConfiguration.defaultExpectation.results = &ClientMockUpdateBackupConfigurationResults{bp1, err} - mmUpdateBackupConfiguration.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmUpdateBackupConfiguration.mock } @@ -14283,7 +13664,6 @@ func (mmUpdateBackupConfiguration *mClientMockUpdateBackupConfiguration) Set(f f } mmUpdateBackupConfiguration.mock.funcUpdateBackupConfiguration = f - mmUpdateBackupConfiguration.mock.funcUpdateBackupConfigurationOrigin = minimock.CallerInfo(1) return mmUpdateBackupConfiguration.mock } @@ -14295,9 +13675,8 @@ func (mmUpdateBackupConfiguration *mClientMockUpdateBackupConfiguration) When(ct } expectation := &ClientMockUpdateBackupConfigurationExpectation{ - mock: mmUpdateBackupConfiguration.mock, - params: &ClientMockUpdateBackupConfigurationParams{ctx, serviceId, b}, - expectationOrigins: ClientMockUpdateBackupConfigurationExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmUpdateBackupConfiguration.mock, + params: &ClientMockUpdateBackupConfigurationParams{ctx, serviceId, b}, } mmUpdateBackupConfiguration.expectations = append(mmUpdateBackupConfiguration.expectations, expectation) return expectation @@ -14315,7 +13694,6 @@ func (mmUpdateBackupConfiguration *mClientMockUpdateBackupConfiguration) Times(n mmUpdateBackupConfiguration.mock.t.Fatalf("Times of ClientMock.UpdateBackupConfiguration mock can not be zero") } mm_atomic.StoreUint64(&mmUpdateBackupConfiguration.expectedInvocations, n) - mmUpdateBackupConfiguration.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmUpdateBackupConfiguration } @@ -14335,8 +13713,6 @@ func (mmUpdateBackupConfiguration *ClientMock) UpdateBackupConfiguration(ctx con mm_atomic.AddUint64(&mmUpdateBackupConfiguration.beforeUpdateBackupConfigurationCounter, 1) defer mm_atomic.AddUint64(&mmUpdateBackupConfiguration.afterUpdateBackupConfigurationCounter, 1) - mmUpdateBackupConfiguration.t.Helper() - if mmUpdateBackupConfiguration.inspectFuncUpdateBackupConfiguration != nil { mmUpdateBackupConfiguration.inspectFuncUpdateBackupConfiguration(ctx, serviceId, b) } @@ -14365,23 +13741,19 @@ func (mmUpdateBackupConfiguration *ClientMock) UpdateBackupConfiguration(ctx con if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmUpdateBackupConfiguration.t.Errorf("ClientMock.UpdateBackupConfiguration got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateBackupConfiguration.UpdateBackupConfigurationMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmUpdateBackupConfiguration.t.Errorf("ClientMock.UpdateBackupConfiguration got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmUpdateBackupConfiguration.t.Errorf("ClientMock.UpdateBackupConfiguration got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateBackupConfiguration.UpdateBackupConfigurationMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmUpdateBackupConfiguration.t.Errorf("ClientMock.UpdateBackupConfiguration got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.b != nil && !minimock.Equal(*mm_want_ptrs.b, mm_got.b) { - mmUpdateBackupConfiguration.t.Errorf("ClientMock.UpdateBackupConfiguration got unexpected parameter b, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateBackupConfiguration.UpdateBackupConfigurationMock.defaultExpectation.expectationOrigins.originB, *mm_want_ptrs.b, mm_got.b, minimock.Diff(*mm_want_ptrs.b, mm_got.b)) + mmUpdateBackupConfiguration.t.Errorf("ClientMock.UpdateBackupConfiguration got unexpected parameter b, want: %#v, got: %#v%s\n", *mm_want_ptrs.b, mm_got.b, minimock.Diff(*mm_want_ptrs.b, mm_got.b)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmUpdateBackupConfiguration.t.Errorf("ClientMock.UpdateBackupConfiguration got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateBackupConfiguration.UpdateBackupConfigurationMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmUpdateBackupConfiguration.t.Errorf("ClientMock.UpdateBackupConfiguration got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmUpdateBackupConfiguration.UpdateBackupConfigurationMock.defaultExpectation.results @@ -14441,7 +13813,7 @@ func (m *ClientMock) MinimockUpdateBackupConfigurationDone() bool { func (m *ClientMock) MinimockUpdateBackupConfigurationInspect() { for _, e := range m.UpdateBackupConfigurationMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateBackupConfiguration at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.UpdateBackupConfiguration with params: %#v", *e.params) } } @@ -14449,19 +13821,19 @@ func (m *ClientMock) MinimockUpdateBackupConfigurationInspect() { // if default expectation was set then invocations count should be greater than zero if m.UpdateBackupConfigurationMock.defaultExpectation != nil && afterUpdateBackupConfigurationCounter < 1 { if m.UpdateBackupConfigurationMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.UpdateBackupConfiguration at\n%s", m.UpdateBackupConfigurationMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.UpdateBackupConfiguration") } else { - m.t.Errorf("Expected call to ClientMock.UpdateBackupConfiguration at\n%s with params: %#v", m.UpdateBackupConfigurationMock.defaultExpectation.expectationOrigins.origin, *m.UpdateBackupConfigurationMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.UpdateBackupConfiguration with params: %#v", *m.UpdateBackupConfigurationMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcUpdateBackupConfiguration != nil && afterUpdateBackupConfigurationCounter < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateBackupConfiguration at\n%s", m.funcUpdateBackupConfigurationOrigin) + m.t.Error("Expected call to ClientMock.UpdateBackupConfiguration") } if !m.UpdateBackupConfigurationMock.invocationsDone() && afterUpdateBackupConfigurationCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.UpdateBackupConfiguration at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.UpdateBackupConfigurationMock.expectedInvocations), m.UpdateBackupConfigurationMock.expectedInvocationsOrigin, afterUpdateBackupConfigurationCounter) + m.t.Errorf("Expected %d calls to ClientMock.UpdateBackupConfiguration but found %d calls", + mm_atomic.LoadUint64(&m.UpdateBackupConfigurationMock.expectedInvocations), afterUpdateBackupConfigurationCounter) } } @@ -14474,19 +13846,16 @@ type mClientMockUpdateClickPipe struct { callArgs []*ClientMockUpdateClickPipeParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockUpdateClickPipeExpectation specifies expectation struct of the Client.UpdateClickPipe type ClientMockUpdateClickPipeExpectation struct { - mock *ClientMock - params *ClientMockUpdateClickPipeParams - paramPtrs *ClientMockUpdateClickPipeParamPtrs - expectationOrigins ClientMockUpdateClickPipeExpectationOrigins - results *ClientMockUpdateClickPipeResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockUpdateClickPipeParams + paramPtrs *ClientMockUpdateClickPipeParamPtrs + results *ClientMockUpdateClickPipeResults + Counter uint64 } // ClientMockUpdateClickPipeParams contains parameters of the Client.UpdateClickPipe @@ -14511,15 +13880,6 @@ type ClientMockUpdateClickPipeResults struct { err error } -// ClientMockUpdateClickPipeOrigins contains origins of expectations of the Client.UpdateClickPipe -type ClientMockUpdateClickPipeExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originClickPipeId string - originRequest string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -14545,7 +13905,6 @@ func (mmUpdateClickPipe *mClientMockUpdateClickPipe) Expect(ctx context.Context, } mmUpdateClickPipe.defaultExpectation.params = &ClientMockUpdateClickPipeParams{ctx, serviceId, clickPipeId, request} - mmUpdateClickPipe.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmUpdateClickPipe.expectations { if minimock.Equal(e.params, mmUpdateClickPipe.defaultExpectation.params) { mmUpdateClickPipe.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmUpdateClickPipe.defaultExpectation.params) @@ -14573,7 +13932,6 @@ func (mmUpdateClickPipe *mClientMockUpdateClickPipe) ExpectCtxParam1(ctx context mmUpdateClickPipe.defaultExpectation.paramPtrs = &ClientMockUpdateClickPipeParamPtrs{} } mmUpdateClickPipe.defaultExpectation.paramPtrs.ctx = &ctx - mmUpdateClickPipe.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmUpdateClickPipe } @@ -14596,7 +13954,6 @@ func (mmUpdateClickPipe *mClientMockUpdateClickPipe) ExpectServiceIdParam2(servi mmUpdateClickPipe.defaultExpectation.paramPtrs = &ClientMockUpdateClickPipeParamPtrs{} } mmUpdateClickPipe.defaultExpectation.paramPtrs.serviceId = &serviceId - mmUpdateClickPipe.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmUpdateClickPipe } @@ -14619,7 +13976,6 @@ func (mmUpdateClickPipe *mClientMockUpdateClickPipe) ExpectClickPipeIdParam3(cli mmUpdateClickPipe.defaultExpectation.paramPtrs = &ClientMockUpdateClickPipeParamPtrs{} } mmUpdateClickPipe.defaultExpectation.paramPtrs.clickPipeId = &clickPipeId - mmUpdateClickPipe.defaultExpectation.expectationOrigins.originClickPipeId = minimock.CallerInfo(1) return mmUpdateClickPipe } @@ -14642,7 +13998,6 @@ func (mmUpdateClickPipe *mClientMockUpdateClickPipe) ExpectRequestParam4(request mmUpdateClickPipe.defaultExpectation.paramPtrs = &ClientMockUpdateClickPipeParamPtrs{} } mmUpdateClickPipe.defaultExpectation.paramPtrs.request = &request - mmUpdateClickPipe.defaultExpectation.expectationOrigins.originRequest = minimock.CallerInfo(1) return mmUpdateClickPipe } @@ -14668,7 +14023,6 @@ func (mmUpdateClickPipe *mClientMockUpdateClickPipe) Return(cp1 *ClickPipe, err mmUpdateClickPipe.defaultExpectation = &ClientMockUpdateClickPipeExpectation{mock: mmUpdateClickPipe.mock} } mmUpdateClickPipe.defaultExpectation.results = &ClientMockUpdateClickPipeResults{cp1, err} - mmUpdateClickPipe.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmUpdateClickPipe.mock } @@ -14683,7 +14037,6 @@ func (mmUpdateClickPipe *mClientMockUpdateClickPipe) Set(f func(ctx context.Cont } mmUpdateClickPipe.mock.funcUpdateClickPipe = f - mmUpdateClickPipe.mock.funcUpdateClickPipeOrigin = minimock.CallerInfo(1) return mmUpdateClickPipe.mock } @@ -14695,9 +14048,8 @@ func (mmUpdateClickPipe *mClientMockUpdateClickPipe) When(ctx context.Context, s } expectation := &ClientMockUpdateClickPipeExpectation{ - mock: mmUpdateClickPipe.mock, - params: &ClientMockUpdateClickPipeParams{ctx, serviceId, clickPipeId, request}, - expectationOrigins: ClientMockUpdateClickPipeExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmUpdateClickPipe.mock, + params: &ClientMockUpdateClickPipeParams{ctx, serviceId, clickPipeId, request}, } mmUpdateClickPipe.expectations = append(mmUpdateClickPipe.expectations, expectation) return expectation @@ -14715,7 +14067,6 @@ func (mmUpdateClickPipe *mClientMockUpdateClickPipe) Times(n uint64) *mClientMoc mmUpdateClickPipe.mock.t.Fatalf("Times of ClientMock.UpdateClickPipe mock can not be zero") } mm_atomic.StoreUint64(&mmUpdateClickPipe.expectedInvocations, n) - mmUpdateClickPipe.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmUpdateClickPipe } @@ -14735,8 +14086,6 @@ func (mmUpdateClickPipe *ClientMock) UpdateClickPipe(ctx context.Context, servic mm_atomic.AddUint64(&mmUpdateClickPipe.beforeUpdateClickPipeCounter, 1) defer mm_atomic.AddUint64(&mmUpdateClickPipe.afterUpdateClickPipeCounter, 1) - mmUpdateClickPipe.t.Helper() - if mmUpdateClickPipe.inspectFuncUpdateClickPipe != nil { mmUpdateClickPipe.inspectFuncUpdateClickPipe(ctx, serviceId, clickPipeId, request) } @@ -14765,28 +14114,23 @@ func (mmUpdateClickPipe *ClientMock) UpdateClickPipe(ctx context.Context, servic if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmUpdateClickPipe.t.Errorf("ClientMock.UpdateClickPipe got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateClickPipe.UpdateClickPipeMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmUpdateClickPipe.t.Errorf("ClientMock.UpdateClickPipe got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmUpdateClickPipe.t.Errorf("ClientMock.UpdateClickPipe got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateClickPipe.UpdateClickPipeMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmUpdateClickPipe.t.Errorf("ClientMock.UpdateClickPipe got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.clickPipeId != nil && !minimock.Equal(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId) { - mmUpdateClickPipe.t.Errorf("ClientMock.UpdateClickPipe got unexpected parameter clickPipeId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateClickPipe.UpdateClickPipeMock.defaultExpectation.expectationOrigins.originClickPipeId, *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) + mmUpdateClickPipe.t.Errorf("ClientMock.UpdateClickPipe got unexpected parameter clickPipeId, want: %#v, got: %#v%s\n", *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) } if mm_want_ptrs.request != nil && !minimock.Equal(*mm_want_ptrs.request, mm_got.request) { - mmUpdateClickPipe.t.Errorf("ClientMock.UpdateClickPipe got unexpected parameter request, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateClickPipe.UpdateClickPipeMock.defaultExpectation.expectationOrigins.originRequest, *mm_want_ptrs.request, mm_got.request, minimock.Diff(*mm_want_ptrs.request, mm_got.request)) + mmUpdateClickPipe.t.Errorf("ClientMock.UpdateClickPipe got unexpected parameter request, want: %#v, got: %#v%s\n", *mm_want_ptrs.request, mm_got.request, minimock.Diff(*mm_want_ptrs.request, mm_got.request)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmUpdateClickPipe.t.Errorf("ClientMock.UpdateClickPipe got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateClickPipe.UpdateClickPipeMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmUpdateClickPipe.t.Errorf("ClientMock.UpdateClickPipe got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmUpdateClickPipe.UpdateClickPipeMock.defaultExpectation.results @@ -14846,7 +14190,7 @@ func (m *ClientMock) MinimockUpdateClickPipeDone() bool { func (m *ClientMock) MinimockUpdateClickPipeInspect() { for _, e := range m.UpdateClickPipeMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateClickPipe at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.UpdateClickPipe with params: %#v", *e.params) } } @@ -14854,19 +14198,19 @@ func (m *ClientMock) MinimockUpdateClickPipeInspect() { // if default expectation was set then invocations count should be greater than zero if m.UpdateClickPipeMock.defaultExpectation != nil && afterUpdateClickPipeCounter < 1 { if m.UpdateClickPipeMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.UpdateClickPipe at\n%s", m.UpdateClickPipeMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.UpdateClickPipe") } else { - m.t.Errorf("Expected call to ClientMock.UpdateClickPipe at\n%s with params: %#v", m.UpdateClickPipeMock.defaultExpectation.expectationOrigins.origin, *m.UpdateClickPipeMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.UpdateClickPipe with params: %#v", *m.UpdateClickPipeMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcUpdateClickPipe != nil && afterUpdateClickPipeCounter < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateClickPipe at\n%s", m.funcUpdateClickPipeOrigin) + m.t.Error("Expected call to ClientMock.UpdateClickPipe") } if !m.UpdateClickPipeMock.invocationsDone() && afterUpdateClickPipeCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.UpdateClickPipe at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.UpdateClickPipeMock.expectedInvocations), m.UpdateClickPipeMock.expectedInvocationsOrigin, afterUpdateClickPipeCounter) + m.t.Errorf("Expected %d calls to ClientMock.UpdateClickPipe but found %d calls", + mm_atomic.LoadUint64(&m.UpdateClickPipeMock.expectedInvocations), afterUpdateClickPipeCounter) } } @@ -14879,19 +14223,16 @@ type mClientMockUpdateOrganizationPrivateEndpoints struct { callArgs []*ClientMockUpdateOrganizationPrivateEndpointsParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockUpdateOrganizationPrivateEndpointsExpectation specifies expectation struct of the Client.UpdateOrganizationPrivateEndpoints type ClientMockUpdateOrganizationPrivateEndpointsExpectation struct { - mock *ClientMock - params *ClientMockUpdateOrganizationPrivateEndpointsParams - paramPtrs *ClientMockUpdateOrganizationPrivateEndpointsParamPtrs - expectationOrigins ClientMockUpdateOrganizationPrivateEndpointsExpectationOrigins - results *ClientMockUpdateOrganizationPrivateEndpointsResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockUpdateOrganizationPrivateEndpointsParams + paramPtrs *ClientMockUpdateOrganizationPrivateEndpointsParamPtrs + results *ClientMockUpdateOrganizationPrivateEndpointsResults + Counter uint64 } // ClientMockUpdateOrganizationPrivateEndpointsParams contains parameters of the Client.UpdateOrganizationPrivateEndpoints @@ -14912,13 +14253,6 @@ type ClientMockUpdateOrganizationPrivateEndpointsResults struct { err error } -// ClientMockUpdateOrganizationPrivateEndpointsOrigins contains origins of expectations of the Client.UpdateOrganizationPrivateEndpoints -type ClientMockUpdateOrganizationPrivateEndpointsExpectationOrigins struct { - origin string - originCtx string - originOrgUpdate string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -14944,7 +14278,6 @@ func (mmUpdateOrganizationPrivateEndpoints *mClientMockUpdateOrganizationPrivate } mmUpdateOrganizationPrivateEndpoints.defaultExpectation.params = &ClientMockUpdateOrganizationPrivateEndpointsParams{ctx, orgUpdate} - mmUpdateOrganizationPrivateEndpoints.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmUpdateOrganizationPrivateEndpoints.expectations { if minimock.Equal(e.params, mmUpdateOrganizationPrivateEndpoints.defaultExpectation.params) { mmUpdateOrganizationPrivateEndpoints.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmUpdateOrganizationPrivateEndpoints.defaultExpectation.params) @@ -14972,7 +14305,6 @@ func (mmUpdateOrganizationPrivateEndpoints *mClientMockUpdateOrganizationPrivate mmUpdateOrganizationPrivateEndpoints.defaultExpectation.paramPtrs = &ClientMockUpdateOrganizationPrivateEndpointsParamPtrs{} } mmUpdateOrganizationPrivateEndpoints.defaultExpectation.paramPtrs.ctx = &ctx - mmUpdateOrganizationPrivateEndpoints.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmUpdateOrganizationPrivateEndpoints } @@ -14995,7 +14327,6 @@ func (mmUpdateOrganizationPrivateEndpoints *mClientMockUpdateOrganizationPrivate mmUpdateOrganizationPrivateEndpoints.defaultExpectation.paramPtrs = &ClientMockUpdateOrganizationPrivateEndpointsParamPtrs{} } mmUpdateOrganizationPrivateEndpoints.defaultExpectation.paramPtrs.orgUpdate = &orgUpdate - mmUpdateOrganizationPrivateEndpoints.defaultExpectation.expectationOrigins.originOrgUpdate = minimock.CallerInfo(1) return mmUpdateOrganizationPrivateEndpoints } @@ -15021,7 +14352,6 @@ func (mmUpdateOrganizationPrivateEndpoints *mClientMockUpdateOrganizationPrivate mmUpdateOrganizationPrivateEndpoints.defaultExpectation = &ClientMockUpdateOrganizationPrivateEndpointsExpectation{mock: mmUpdateOrganizationPrivateEndpoints.mock} } mmUpdateOrganizationPrivateEndpoints.defaultExpectation.results = &ClientMockUpdateOrganizationPrivateEndpointsResults{pap1, err} - mmUpdateOrganizationPrivateEndpoints.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmUpdateOrganizationPrivateEndpoints.mock } @@ -15036,7 +14366,6 @@ func (mmUpdateOrganizationPrivateEndpoints *mClientMockUpdateOrganizationPrivate } mmUpdateOrganizationPrivateEndpoints.mock.funcUpdateOrganizationPrivateEndpoints = f - mmUpdateOrganizationPrivateEndpoints.mock.funcUpdateOrganizationPrivateEndpointsOrigin = minimock.CallerInfo(1) return mmUpdateOrganizationPrivateEndpoints.mock } @@ -15048,9 +14377,8 @@ func (mmUpdateOrganizationPrivateEndpoints *mClientMockUpdateOrganizationPrivate } expectation := &ClientMockUpdateOrganizationPrivateEndpointsExpectation{ - mock: mmUpdateOrganizationPrivateEndpoints.mock, - params: &ClientMockUpdateOrganizationPrivateEndpointsParams{ctx, orgUpdate}, - expectationOrigins: ClientMockUpdateOrganizationPrivateEndpointsExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmUpdateOrganizationPrivateEndpoints.mock, + params: &ClientMockUpdateOrganizationPrivateEndpointsParams{ctx, orgUpdate}, } mmUpdateOrganizationPrivateEndpoints.expectations = append(mmUpdateOrganizationPrivateEndpoints.expectations, expectation) return expectation @@ -15068,7 +14396,6 @@ func (mmUpdateOrganizationPrivateEndpoints *mClientMockUpdateOrganizationPrivate mmUpdateOrganizationPrivateEndpoints.mock.t.Fatalf("Times of ClientMock.UpdateOrganizationPrivateEndpoints mock can not be zero") } mm_atomic.StoreUint64(&mmUpdateOrganizationPrivateEndpoints.expectedInvocations, n) - mmUpdateOrganizationPrivateEndpoints.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmUpdateOrganizationPrivateEndpoints } @@ -15088,8 +14415,6 @@ func (mmUpdateOrganizationPrivateEndpoints *ClientMock) UpdateOrganizationPrivat mm_atomic.AddUint64(&mmUpdateOrganizationPrivateEndpoints.beforeUpdateOrganizationPrivateEndpointsCounter, 1) defer mm_atomic.AddUint64(&mmUpdateOrganizationPrivateEndpoints.afterUpdateOrganizationPrivateEndpointsCounter, 1) - mmUpdateOrganizationPrivateEndpoints.t.Helper() - if mmUpdateOrganizationPrivateEndpoints.inspectFuncUpdateOrganizationPrivateEndpoints != nil { mmUpdateOrganizationPrivateEndpoints.inspectFuncUpdateOrganizationPrivateEndpoints(ctx, orgUpdate) } @@ -15118,18 +14443,15 @@ func (mmUpdateOrganizationPrivateEndpoints *ClientMock) UpdateOrganizationPrivat if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmUpdateOrganizationPrivateEndpoints.t.Errorf("ClientMock.UpdateOrganizationPrivateEndpoints got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateOrganizationPrivateEndpoints.UpdateOrganizationPrivateEndpointsMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmUpdateOrganizationPrivateEndpoints.t.Errorf("ClientMock.UpdateOrganizationPrivateEndpoints got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.orgUpdate != nil && !minimock.Equal(*mm_want_ptrs.orgUpdate, mm_got.orgUpdate) { - mmUpdateOrganizationPrivateEndpoints.t.Errorf("ClientMock.UpdateOrganizationPrivateEndpoints got unexpected parameter orgUpdate, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateOrganizationPrivateEndpoints.UpdateOrganizationPrivateEndpointsMock.defaultExpectation.expectationOrigins.originOrgUpdate, *mm_want_ptrs.orgUpdate, mm_got.orgUpdate, minimock.Diff(*mm_want_ptrs.orgUpdate, mm_got.orgUpdate)) + mmUpdateOrganizationPrivateEndpoints.t.Errorf("ClientMock.UpdateOrganizationPrivateEndpoints got unexpected parameter orgUpdate, want: %#v, got: %#v%s\n", *mm_want_ptrs.orgUpdate, mm_got.orgUpdate, minimock.Diff(*mm_want_ptrs.orgUpdate, mm_got.orgUpdate)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmUpdateOrganizationPrivateEndpoints.t.Errorf("ClientMock.UpdateOrganizationPrivateEndpoints got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateOrganizationPrivateEndpoints.UpdateOrganizationPrivateEndpointsMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmUpdateOrganizationPrivateEndpoints.t.Errorf("ClientMock.UpdateOrganizationPrivateEndpoints got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmUpdateOrganizationPrivateEndpoints.UpdateOrganizationPrivateEndpointsMock.defaultExpectation.results @@ -15189,7 +14511,7 @@ func (m *ClientMock) MinimockUpdateOrganizationPrivateEndpointsDone() bool { func (m *ClientMock) MinimockUpdateOrganizationPrivateEndpointsInspect() { for _, e := range m.UpdateOrganizationPrivateEndpointsMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateOrganizationPrivateEndpoints at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.UpdateOrganizationPrivateEndpoints with params: %#v", *e.params) } } @@ -15197,19 +14519,19 @@ func (m *ClientMock) MinimockUpdateOrganizationPrivateEndpointsInspect() { // if default expectation was set then invocations count should be greater than zero if m.UpdateOrganizationPrivateEndpointsMock.defaultExpectation != nil && afterUpdateOrganizationPrivateEndpointsCounter < 1 { if m.UpdateOrganizationPrivateEndpointsMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.UpdateOrganizationPrivateEndpoints at\n%s", m.UpdateOrganizationPrivateEndpointsMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.UpdateOrganizationPrivateEndpoints") } else { - m.t.Errorf("Expected call to ClientMock.UpdateOrganizationPrivateEndpoints at\n%s with params: %#v", m.UpdateOrganizationPrivateEndpointsMock.defaultExpectation.expectationOrigins.origin, *m.UpdateOrganizationPrivateEndpointsMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.UpdateOrganizationPrivateEndpoints with params: %#v", *m.UpdateOrganizationPrivateEndpointsMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcUpdateOrganizationPrivateEndpoints != nil && afterUpdateOrganizationPrivateEndpointsCounter < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateOrganizationPrivateEndpoints at\n%s", m.funcUpdateOrganizationPrivateEndpointsOrigin) + m.t.Error("Expected call to ClientMock.UpdateOrganizationPrivateEndpoints") } if !m.UpdateOrganizationPrivateEndpointsMock.invocationsDone() && afterUpdateOrganizationPrivateEndpointsCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.UpdateOrganizationPrivateEndpoints at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.UpdateOrganizationPrivateEndpointsMock.expectedInvocations), m.UpdateOrganizationPrivateEndpointsMock.expectedInvocationsOrigin, afterUpdateOrganizationPrivateEndpointsCounter) + m.t.Errorf("Expected %d calls to ClientMock.UpdateOrganizationPrivateEndpoints but found %d calls", + mm_atomic.LoadUint64(&m.UpdateOrganizationPrivateEndpointsMock.expectedInvocations), afterUpdateOrganizationPrivateEndpointsCounter) } } @@ -15222,19 +14544,16 @@ type mClientMockUpdateReplicaScaling struct { callArgs []*ClientMockUpdateReplicaScalingParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockUpdateReplicaScalingExpectation specifies expectation struct of the Client.UpdateReplicaScaling type ClientMockUpdateReplicaScalingExpectation struct { - mock *ClientMock - params *ClientMockUpdateReplicaScalingParams - paramPtrs *ClientMockUpdateReplicaScalingParamPtrs - expectationOrigins ClientMockUpdateReplicaScalingExpectationOrigins - results *ClientMockUpdateReplicaScalingResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockUpdateReplicaScalingParams + paramPtrs *ClientMockUpdateReplicaScalingParamPtrs + results *ClientMockUpdateReplicaScalingResults + Counter uint64 } // ClientMockUpdateReplicaScalingParams contains parameters of the Client.UpdateReplicaScaling @@ -15257,14 +14576,6 @@ type ClientMockUpdateReplicaScalingResults struct { err error } -// ClientMockUpdateReplicaScalingOrigins contains origins of expectations of the Client.UpdateReplicaScaling -type ClientMockUpdateReplicaScalingExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originS string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -15290,7 +14601,6 @@ func (mmUpdateReplicaScaling *mClientMockUpdateReplicaScaling) Expect(ctx contex } mmUpdateReplicaScaling.defaultExpectation.params = &ClientMockUpdateReplicaScalingParams{ctx, serviceId, s} - mmUpdateReplicaScaling.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmUpdateReplicaScaling.expectations { if minimock.Equal(e.params, mmUpdateReplicaScaling.defaultExpectation.params) { mmUpdateReplicaScaling.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmUpdateReplicaScaling.defaultExpectation.params) @@ -15318,7 +14628,6 @@ func (mmUpdateReplicaScaling *mClientMockUpdateReplicaScaling) ExpectCtxParam1(c mmUpdateReplicaScaling.defaultExpectation.paramPtrs = &ClientMockUpdateReplicaScalingParamPtrs{} } mmUpdateReplicaScaling.defaultExpectation.paramPtrs.ctx = &ctx - mmUpdateReplicaScaling.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmUpdateReplicaScaling } @@ -15341,7 +14650,6 @@ func (mmUpdateReplicaScaling *mClientMockUpdateReplicaScaling) ExpectServiceIdPa mmUpdateReplicaScaling.defaultExpectation.paramPtrs = &ClientMockUpdateReplicaScalingParamPtrs{} } mmUpdateReplicaScaling.defaultExpectation.paramPtrs.serviceId = &serviceId - mmUpdateReplicaScaling.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmUpdateReplicaScaling } @@ -15364,7 +14672,6 @@ func (mmUpdateReplicaScaling *mClientMockUpdateReplicaScaling) ExpectSParam3(s R mmUpdateReplicaScaling.defaultExpectation.paramPtrs = &ClientMockUpdateReplicaScalingParamPtrs{} } mmUpdateReplicaScaling.defaultExpectation.paramPtrs.s = &s - mmUpdateReplicaScaling.defaultExpectation.expectationOrigins.originS = minimock.CallerInfo(1) return mmUpdateReplicaScaling } @@ -15390,7 +14697,6 @@ func (mmUpdateReplicaScaling *mClientMockUpdateReplicaScaling) Return(sp1 *Servi mmUpdateReplicaScaling.defaultExpectation = &ClientMockUpdateReplicaScalingExpectation{mock: mmUpdateReplicaScaling.mock} } mmUpdateReplicaScaling.defaultExpectation.results = &ClientMockUpdateReplicaScalingResults{sp1, err} - mmUpdateReplicaScaling.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmUpdateReplicaScaling.mock } @@ -15405,7 +14711,6 @@ func (mmUpdateReplicaScaling *mClientMockUpdateReplicaScaling) Set(f func(ctx co } mmUpdateReplicaScaling.mock.funcUpdateReplicaScaling = f - mmUpdateReplicaScaling.mock.funcUpdateReplicaScalingOrigin = minimock.CallerInfo(1) return mmUpdateReplicaScaling.mock } @@ -15417,9 +14722,8 @@ func (mmUpdateReplicaScaling *mClientMockUpdateReplicaScaling) When(ctx context. } expectation := &ClientMockUpdateReplicaScalingExpectation{ - mock: mmUpdateReplicaScaling.mock, - params: &ClientMockUpdateReplicaScalingParams{ctx, serviceId, s}, - expectationOrigins: ClientMockUpdateReplicaScalingExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmUpdateReplicaScaling.mock, + params: &ClientMockUpdateReplicaScalingParams{ctx, serviceId, s}, } mmUpdateReplicaScaling.expectations = append(mmUpdateReplicaScaling.expectations, expectation) return expectation @@ -15437,7 +14741,6 @@ func (mmUpdateReplicaScaling *mClientMockUpdateReplicaScaling) Times(n uint64) * mmUpdateReplicaScaling.mock.t.Fatalf("Times of ClientMock.UpdateReplicaScaling mock can not be zero") } mm_atomic.StoreUint64(&mmUpdateReplicaScaling.expectedInvocations, n) - mmUpdateReplicaScaling.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmUpdateReplicaScaling } @@ -15457,8 +14760,6 @@ func (mmUpdateReplicaScaling *ClientMock) UpdateReplicaScaling(ctx context.Conte mm_atomic.AddUint64(&mmUpdateReplicaScaling.beforeUpdateReplicaScalingCounter, 1) defer mm_atomic.AddUint64(&mmUpdateReplicaScaling.afterUpdateReplicaScalingCounter, 1) - mmUpdateReplicaScaling.t.Helper() - if mmUpdateReplicaScaling.inspectFuncUpdateReplicaScaling != nil { mmUpdateReplicaScaling.inspectFuncUpdateReplicaScaling(ctx, serviceId, s) } @@ -15487,23 +14788,19 @@ func (mmUpdateReplicaScaling *ClientMock) UpdateReplicaScaling(ctx context.Conte if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmUpdateReplicaScaling.t.Errorf("ClientMock.UpdateReplicaScaling got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateReplicaScaling.UpdateReplicaScalingMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmUpdateReplicaScaling.t.Errorf("ClientMock.UpdateReplicaScaling got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmUpdateReplicaScaling.t.Errorf("ClientMock.UpdateReplicaScaling got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateReplicaScaling.UpdateReplicaScalingMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmUpdateReplicaScaling.t.Errorf("ClientMock.UpdateReplicaScaling got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.s != nil && !minimock.Equal(*mm_want_ptrs.s, mm_got.s) { - mmUpdateReplicaScaling.t.Errorf("ClientMock.UpdateReplicaScaling got unexpected parameter s, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateReplicaScaling.UpdateReplicaScalingMock.defaultExpectation.expectationOrigins.originS, *mm_want_ptrs.s, mm_got.s, minimock.Diff(*mm_want_ptrs.s, mm_got.s)) + mmUpdateReplicaScaling.t.Errorf("ClientMock.UpdateReplicaScaling got unexpected parameter s, want: %#v, got: %#v%s\n", *mm_want_ptrs.s, mm_got.s, minimock.Diff(*mm_want_ptrs.s, mm_got.s)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmUpdateReplicaScaling.t.Errorf("ClientMock.UpdateReplicaScaling got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateReplicaScaling.UpdateReplicaScalingMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmUpdateReplicaScaling.t.Errorf("ClientMock.UpdateReplicaScaling got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmUpdateReplicaScaling.UpdateReplicaScalingMock.defaultExpectation.results @@ -15563,7 +14860,7 @@ func (m *ClientMock) MinimockUpdateReplicaScalingDone() bool { func (m *ClientMock) MinimockUpdateReplicaScalingInspect() { for _, e := range m.UpdateReplicaScalingMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateReplicaScaling at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.UpdateReplicaScaling with params: %#v", *e.params) } } @@ -15571,19 +14868,19 @@ func (m *ClientMock) MinimockUpdateReplicaScalingInspect() { // if default expectation was set then invocations count should be greater than zero if m.UpdateReplicaScalingMock.defaultExpectation != nil && afterUpdateReplicaScalingCounter < 1 { if m.UpdateReplicaScalingMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.UpdateReplicaScaling at\n%s", m.UpdateReplicaScalingMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.UpdateReplicaScaling") } else { - m.t.Errorf("Expected call to ClientMock.UpdateReplicaScaling at\n%s with params: %#v", m.UpdateReplicaScalingMock.defaultExpectation.expectationOrigins.origin, *m.UpdateReplicaScalingMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.UpdateReplicaScaling with params: %#v", *m.UpdateReplicaScalingMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcUpdateReplicaScaling != nil && afterUpdateReplicaScalingCounter < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateReplicaScaling at\n%s", m.funcUpdateReplicaScalingOrigin) + m.t.Error("Expected call to ClientMock.UpdateReplicaScaling") } if !m.UpdateReplicaScalingMock.invocationsDone() && afterUpdateReplicaScalingCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.UpdateReplicaScaling at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.UpdateReplicaScalingMock.expectedInvocations), m.UpdateReplicaScalingMock.expectedInvocationsOrigin, afterUpdateReplicaScalingCounter) + m.t.Errorf("Expected %d calls to ClientMock.UpdateReplicaScaling but found %d calls", + mm_atomic.LoadUint64(&m.UpdateReplicaScalingMock.expectedInvocations), afterUpdateReplicaScalingCounter) } } @@ -15596,19 +14893,16 @@ type mClientMockUpdateService struct { callArgs []*ClientMockUpdateServiceParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockUpdateServiceExpectation specifies expectation struct of the Client.UpdateService type ClientMockUpdateServiceExpectation struct { - mock *ClientMock - params *ClientMockUpdateServiceParams - paramPtrs *ClientMockUpdateServiceParamPtrs - expectationOrigins ClientMockUpdateServiceExpectationOrigins - results *ClientMockUpdateServiceResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockUpdateServiceParams + paramPtrs *ClientMockUpdateServiceParamPtrs + results *ClientMockUpdateServiceResults + Counter uint64 } // ClientMockUpdateServiceParams contains parameters of the Client.UpdateService @@ -15631,14 +14925,6 @@ type ClientMockUpdateServiceResults struct { err error } -// ClientMockUpdateServiceOrigins contains origins of expectations of the Client.UpdateService -type ClientMockUpdateServiceExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originS string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -15664,7 +14950,6 @@ func (mmUpdateService *mClientMockUpdateService) Expect(ctx context.Context, ser } mmUpdateService.defaultExpectation.params = &ClientMockUpdateServiceParams{ctx, serviceId, s} - mmUpdateService.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmUpdateService.expectations { if minimock.Equal(e.params, mmUpdateService.defaultExpectation.params) { mmUpdateService.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmUpdateService.defaultExpectation.params) @@ -15692,7 +14977,6 @@ func (mmUpdateService *mClientMockUpdateService) ExpectCtxParam1(ctx context.Con mmUpdateService.defaultExpectation.paramPtrs = &ClientMockUpdateServiceParamPtrs{} } mmUpdateService.defaultExpectation.paramPtrs.ctx = &ctx - mmUpdateService.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmUpdateService } @@ -15715,7 +14999,6 @@ func (mmUpdateService *mClientMockUpdateService) ExpectServiceIdParam2(serviceId mmUpdateService.defaultExpectation.paramPtrs = &ClientMockUpdateServiceParamPtrs{} } mmUpdateService.defaultExpectation.paramPtrs.serviceId = &serviceId - mmUpdateService.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmUpdateService } @@ -15738,7 +15021,6 @@ func (mmUpdateService *mClientMockUpdateService) ExpectSParam3(s ServiceUpdate) mmUpdateService.defaultExpectation.paramPtrs = &ClientMockUpdateServiceParamPtrs{} } mmUpdateService.defaultExpectation.paramPtrs.s = &s - mmUpdateService.defaultExpectation.expectationOrigins.originS = minimock.CallerInfo(1) return mmUpdateService } @@ -15764,7 +15046,6 @@ func (mmUpdateService *mClientMockUpdateService) Return(sp1 *Service, err error) mmUpdateService.defaultExpectation = &ClientMockUpdateServiceExpectation{mock: mmUpdateService.mock} } mmUpdateService.defaultExpectation.results = &ClientMockUpdateServiceResults{sp1, err} - mmUpdateService.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmUpdateService.mock } @@ -15779,7 +15060,6 @@ func (mmUpdateService *mClientMockUpdateService) Set(f func(ctx context.Context, } mmUpdateService.mock.funcUpdateService = f - mmUpdateService.mock.funcUpdateServiceOrigin = minimock.CallerInfo(1) return mmUpdateService.mock } @@ -15791,9 +15071,8 @@ func (mmUpdateService *mClientMockUpdateService) When(ctx context.Context, servi } expectation := &ClientMockUpdateServiceExpectation{ - mock: mmUpdateService.mock, - params: &ClientMockUpdateServiceParams{ctx, serviceId, s}, - expectationOrigins: ClientMockUpdateServiceExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmUpdateService.mock, + params: &ClientMockUpdateServiceParams{ctx, serviceId, s}, } mmUpdateService.expectations = append(mmUpdateService.expectations, expectation) return expectation @@ -15811,7 +15090,6 @@ func (mmUpdateService *mClientMockUpdateService) Times(n uint64) *mClientMockUpd mmUpdateService.mock.t.Fatalf("Times of ClientMock.UpdateService mock can not be zero") } mm_atomic.StoreUint64(&mmUpdateService.expectedInvocations, n) - mmUpdateService.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmUpdateService } @@ -15831,8 +15109,6 @@ func (mmUpdateService *ClientMock) UpdateService(ctx context.Context, serviceId mm_atomic.AddUint64(&mmUpdateService.beforeUpdateServiceCounter, 1) defer mm_atomic.AddUint64(&mmUpdateService.afterUpdateServiceCounter, 1) - mmUpdateService.t.Helper() - if mmUpdateService.inspectFuncUpdateService != nil { mmUpdateService.inspectFuncUpdateService(ctx, serviceId, s) } @@ -15861,23 +15137,19 @@ func (mmUpdateService *ClientMock) UpdateService(ctx context.Context, serviceId if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmUpdateService.t.Errorf("ClientMock.UpdateService got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateService.UpdateServiceMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmUpdateService.t.Errorf("ClientMock.UpdateService got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmUpdateService.t.Errorf("ClientMock.UpdateService got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateService.UpdateServiceMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmUpdateService.t.Errorf("ClientMock.UpdateService got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.s != nil && !minimock.Equal(*mm_want_ptrs.s, mm_got.s) { - mmUpdateService.t.Errorf("ClientMock.UpdateService got unexpected parameter s, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateService.UpdateServiceMock.defaultExpectation.expectationOrigins.originS, *mm_want_ptrs.s, mm_got.s, minimock.Diff(*mm_want_ptrs.s, mm_got.s)) + mmUpdateService.t.Errorf("ClientMock.UpdateService got unexpected parameter s, want: %#v, got: %#v%s\n", *mm_want_ptrs.s, mm_got.s, minimock.Diff(*mm_want_ptrs.s, mm_got.s)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmUpdateService.t.Errorf("ClientMock.UpdateService got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateService.UpdateServiceMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmUpdateService.t.Errorf("ClientMock.UpdateService got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmUpdateService.UpdateServiceMock.defaultExpectation.results @@ -15937,7 +15209,7 @@ func (m *ClientMock) MinimockUpdateServiceDone() bool { func (m *ClientMock) MinimockUpdateServiceInspect() { for _, e := range m.UpdateServiceMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateService at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.UpdateService with params: %#v", *e.params) } } @@ -15945,19 +15217,19 @@ func (m *ClientMock) MinimockUpdateServiceInspect() { // if default expectation was set then invocations count should be greater than zero if m.UpdateServiceMock.defaultExpectation != nil && afterUpdateServiceCounter < 1 { if m.UpdateServiceMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.UpdateService at\n%s", m.UpdateServiceMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.UpdateService") } else { - m.t.Errorf("Expected call to ClientMock.UpdateService at\n%s with params: %#v", m.UpdateServiceMock.defaultExpectation.expectationOrigins.origin, *m.UpdateServiceMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.UpdateService with params: %#v", *m.UpdateServiceMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcUpdateService != nil && afterUpdateServiceCounter < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateService at\n%s", m.funcUpdateServiceOrigin) + m.t.Error("Expected call to ClientMock.UpdateService") } if !m.UpdateServiceMock.invocationsDone() && afterUpdateServiceCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.UpdateService at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.UpdateServiceMock.expectedInvocations), m.UpdateServiceMock.expectedInvocationsOrigin, afterUpdateServiceCounter) + m.t.Errorf("Expected %d calls to ClientMock.UpdateService but found %d calls", + mm_atomic.LoadUint64(&m.UpdateServiceMock.expectedInvocations), afterUpdateServiceCounter) } } @@ -15970,19 +15242,16 @@ type mClientMockUpdateServicePassword struct { callArgs []*ClientMockUpdateServicePasswordParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockUpdateServicePasswordExpectation specifies expectation struct of the Client.UpdateServicePassword type ClientMockUpdateServicePasswordExpectation struct { - mock *ClientMock - params *ClientMockUpdateServicePasswordParams - paramPtrs *ClientMockUpdateServicePasswordParamPtrs - expectationOrigins ClientMockUpdateServicePasswordExpectationOrigins - results *ClientMockUpdateServicePasswordResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockUpdateServicePasswordParams + paramPtrs *ClientMockUpdateServicePasswordParamPtrs + results *ClientMockUpdateServicePasswordResults + Counter uint64 } // ClientMockUpdateServicePasswordParams contains parameters of the Client.UpdateServicePassword @@ -16005,14 +15274,6 @@ type ClientMockUpdateServicePasswordResults struct { err error } -// ClientMockUpdateServicePasswordOrigins contains origins of expectations of the Client.UpdateServicePassword -type ClientMockUpdateServicePasswordExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originU string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -16038,7 +15299,6 @@ func (mmUpdateServicePassword *mClientMockUpdateServicePassword) Expect(ctx cont } mmUpdateServicePassword.defaultExpectation.params = &ClientMockUpdateServicePasswordParams{ctx, serviceId, u} - mmUpdateServicePassword.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmUpdateServicePassword.expectations { if minimock.Equal(e.params, mmUpdateServicePassword.defaultExpectation.params) { mmUpdateServicePassword.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmUpdateServicePassword.defaultExpectation.params) @@ -16066,7 +15326,6 @@ func (mmUpdateServicePassword *mClientMockUpdateServicePassword) ExpectCtxParam1 mmUpdateServicePassword.defaultExpectation.paramPtrs = &ClientMockUpdateServicePasswordParamPtrs{} } mmUpdateServicePassword.defaultExpectation.paramPtrs.ctx = &ctx - mmUpdateServicePassword.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmUpdateServicePassword } @@ -16089,7 +15348,6 @@ func (mmUpdateServicePassword *mClientMockUpdateServicePassword) ExpectServiceId mmUpdateServicePassword.defaultExpectation.paramPtrs = &ClientMockUpdateServicePasswordParamPtrs{} } mmUpdateServicePassword.defaultExpectation.paramPtrs.serviceId = &serviceId - mmUpdateServicePassword.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmUpdateServicePassword } @@ -16112,7 +15370,6 @@ func (mmUpdateServicePassword *mClientMockUpdateServicePassword) ExpectUParam3(u mmUpdateServicePassword.defaultExpectation.paramPtrs = &ClientMockUpdateServicePasswordParamPtrs{} } mmUpdateServicePassword.defaultExpectation.paramPtrs.u = &u - mmUpdateServicePassword.defaultExpectation.expectationOrigins.originU = minimock.CallerInfo(1) return mmUpdateServicePassword } @@ -16138,7 +15395,6 @@ func (mmUpdateServicePassword *mClientMockUpdateServicePassword) Return(sp1 *Ser mmUpdateServicePassword.defaultExpectation = &ClientMockUpdateServicePasswordExpectation{mock: mmUpdateServicePassword.mock} } mmUpdateServicePassword.defaultExpectation.results = &ClientMockUpdateServicePasswordResults{sp1, err} - mmUpdateServicePassword.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmUpdateServicePassword.mock } @@ -16153,7 +15409,6 @@ func (mmUpdateServicePassword *mClientMockUpdateServicePassword) Set(f func(ctx } mmUpdateServicePassword.mock.funcUpdateServicePassword = f - mmUpdateServicePassword.mock.funcUpdateServicePasswordOrigin = minimock.CallerInfo(1) return mmUpdateServicePassword.mock } @@ -16165,9 +15420,8 @@ func (mmUpdateServicePassword *mClientMockUpdateServicePassword) When(ctx contex } expectation := &ClientMockUpdateServicePasswordExpectation{ - mock: mmUpdateServicePassword.mock, - params: &ClientMockUpdateServicePasswordParams{ctx, serviceId, u}, - expectationOrigins: ClientMockUpdateServicePasswordExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmUpdateServicePassword.mock, + params: &ClientMockUpdateServicePasswordParams{ctx, serviceId, u}, } mmUpdateServicePassword.expectations = append(mmUpdateServicePassword.expectations, expectation) return expectation @@ -16185,7 +15439,6 @@ func (mmUpdateServicePassword *mClientMockUpdateServicePassword) Times(n uint64) mmUpdateServicePassword.mock.t.Fatalf("Times of ClientMock.UpdateServicePassword mock can not be zero") } mm_atomic.StoreUint64(&mmUpdateServicePassword.expectedInvocations, n) - mmUpdateServicePassword.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmUpdateServicePassword } @@ -16205,8 +15458,6 @@ func (mmUpdateServicePassword *ClientMock) UpdateServicePassword(ctx context.Con mm_atomic.AddUint64(&mmUpdateServicePassword.beforeUpdateServicePasswordCounter, 1) defer mm_atomic.AddUint64(&mmUpdateServicePassword.afterUpdateServicePasswordCounter, 1) - mmUpdateServicePassword.t.Helper() - if mmUpdateServicePassword.inspectFuncUpdateServicePassword != nil { mmUpdateServicePassword.inspectFuncUpdateServicePassword(ctx, serviceId, u) } @@ -16235,23 +15486,19 @@ func (mmUpdateServicePassword *ClientMock) UpdateServicePassword(ctx context.Con if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmUpdateServicePassword.t.Errorf("ClientMock.UpdateServicePassword got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateServicePassword.UpdateServicePasswordMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmUpdateServicePassword.t.Errorf("ClientMock.UpdateServicePassword got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmUpdateServicePassword.t.Errorf("ClientMock.UpdateServicePassword got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateServicePassword.UpdateServicePasswordMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmUpdateServicePassword.t.Errorf("ClientMock.UpdateServicePassword got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.u != nil && !minimock.Equal(*mm_want_ptrs.u, mm_got.u) { - mmUpdateServicePassword.t.Errorf("ClientMock.UpdateServicePassword got unexpected parameter u, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateServicePassword.UpdateServicePasswordMock.defaultExpectation.expectationOrigins.originU, *mm_want_ptrs.u, mm_got.u, minimock.Diff(*mm_want_ptrs.u, mm_got.u)) + mmUpdateServicePassword.t.Errorf("ClientMock.UpdateServicePassword got unexpected parameter u, want: %#v, got: %#v%s\n", *mm_want_ptrs.u, mm_got.u, minimock.Diff(*mm_want_ptrs.u, mm_got.u)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmUpdateServicePassword.t.Errorf("ClientMock.UpdateServicePassword got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmUpdateServicePassword.UpdateServicePasswordMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmUpdateServicePassword.t.Errorf("ClientMock.UpdateServicePassword got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmUpdateServicePassword.UpdateServicePasswordMock.defaultExpectation.results @@ -16311,7 +15558,7 @@ func (m *ClientMock) MinimockUpdateServicePasswordDone() bool { func (m *ClientMock) MinimockUpdateServicePasswordInspect() { for _, e := range m.UpdateServicePasswordMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateServicePassword at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.UpdateServicePassword with params: %#v", *e.params) } } @@ -16319,19 +15566,19 @@ func (m *ClientMock) MinimockUpdateServicePasswordInspect() { // if default expectation was set then invocations count should be greater than zero if m.UpdateServicePasswordMock.defaultExpectation != nil && afterUpdateServicePasswordCounter < 1 { if m.UpdateServicePasswordMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.UpdateServicePassword at\n%s", m.UpdateServicePasswordMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.UpdateServicePassword") } else { - m.t.Errorf("Expected call to ClientMock.UpdateServicePassword at\n%s with params: %#v", m.UpdateServicePasswordMock.defaultExpectation.expectationOrigins.origin, *m.UpdateServicePasswordMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.UpdateServicePassword with params: %#v", *m.UpdateServicePasswordMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcUpdateServicePassword != nil && afterUpdateServicePasswordCounter < 1 { - m.t.Errorf("Expected call to ClientMock.UpdateServicePassword at\n%s", m.funcUpdateServicePasswordOrigin) + m.t.Error("Expected call to ClientMock.UpdateServicePassword") } if !m.UpdateServicePasswordMock.invocationsDone() && afterUpdateServicePasswordCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.UpdateServicePassword at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.UpdateServicePasswordMock.expectedInvocations), m.UpdateServicePasswordMock.expectedInvocationsOrigin, afterUpdateServicePasswordCounter) + m.t.Errorf("Expected %d calls to ClientMock.UpdateServicePassword but found %d calls", + mm_atomic.LoadUint64(&m.UpdateServicePasswordMock.expectedInvocations), afterUpdateServicePasswordCounter) } } @@ -16344,19 +15591,16 @@ type mClientMockWaitForClickPipeState struct { callArgs []*ClientMockWaitForClickPipeStateParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockWaitForClickPipeStateExpectation specifies expectation struct of the Client.WaitForClickPipeState type ClientMockWaitForClickPipeStateExpectation struct { - mock *ClientMock - params *ClientMockWaitForClickPipeStateParams - paramPtrs *ClientMockWaitForClickPipeStateParamPtrs - expectationOrigins ClientMockWaitForClickPipeStateExpectationOrigins - results *ClientMockWaitForClickPipeStateResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockWaitForClickPipeStateParams + paramPtrs *ClientMockWaitForClickPipeStateParamPtrs + results *ClientMockWaitForClickPipeStateResults + Counter uint64 } // ClientMockWaitForClickPipeStateParams contains parameters of the Client.WaitForClickPipeState @@ -16383,16 +15627,6 @@ type ClientMockWaitForClickPipeStateResults struct { err error } -// ClientMockWaitForClickPipeStateOrigins contains origins of expectations of the Client.WaitForClickPipeState -type ClientMockWaitForClickPipeStateExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originClickPipeId string - originStateChecker string - originMaxWaitSeconds string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -16418,7 +15652,6 @@ func (mmWaitForClickPipeState *mClientMockWaitForClickPipeState) Expect(ctx cont } mmWaitForClickPipeState.defaultExpectation.params = &ClientMockWaitForClickPipeStateParams{ctx, serviceId, clickPipeId, stateChecker, maxWaitSeconds} - mmWaitForClickPipeState.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmWaitForClickPipeState.expectations { if minimock.Equal(e.params, mmWaitForClickPipeState.defaultExpectation.params) { mmWaitForClickPipeState.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmWaitForClickPipeState.defaultExpectation.params) @@ -16446,7 +15679,6 @@ func (mmWaitForClickPipeState *mClientMockWaitForClickPipeState) ExpectCtxParam1 mmWaitForClickPipeState.defaultExpectation.paramPtrs = &ClientMockWaitForClickPipeStateParamPtrs{} } mmWaitForClickPipeState.defaultExpectation.paramPtrs.ctx = &ctx - mmWaitForClickPipeState.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmWaitForClickPipeState } @@ -16469,7 +15701,6 @@ func (mmWaitForClickPipeState *mClientMockWaitForClickPipeState) ExpectServiceId mmWaitForClickPipeState.defaultExpectation.paramPtrs = &ClientMockWaitForClickPipeStateParamPtrs{} } mmWaitForClickPipeState.defaultExpectation.paramPtrs.serviceId = &serviceId - mmWaitForClickPipeState.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmWaitForClickPipeState } @@ -16492,7 +15723,6 @@ func (mmWaitForClickPipeState *mClientMockWaitForClickPipeState) ExpectClickPipe mmWaitForClickPipeState.defaultExpectation.paramPtrs = &ClientMockWaitForClickPipeStateParamPtrs{} } mmWaitForClickPipeState.defaultExpectation.paramPtrs.clickPipeId = &clickPipeId - mmWaitForClickPipeState.defaultExpectation.expectationOrigins.originClickPipeId = minimock.CallerInfo(1) return mmWaitForClickPipeState } @@ -16515,7 +15745,6 @@ func (mmWaitForClickPipeState *mClientMockWaitForClickPipeState) ExpectStateChec mmWaitForClickPipeState.defaultExpectation.paramPtrs = &ClientMockWaitForClickPipeStateParamPtrs{} } mmWaitForClickPipeState.defaultExpectation.paramPtrs.stateChecker = &stateChecker - mmWaitForClickPipeState.defaultExpectation.expectationOrigins.originStateChecker = minimock.CallerInfo(1) return mmWaitForClickPipeState } @@ -16538,7 +15767,6 @@ func (mmWaitForClickPipeState *mClientMockWaitForClickPipeState) ExpectMaxWaitSe mmWaitForClickPipeState.defaultExpectation.paramPtrs = &ClientMockWaitForClickPipeStateParamPtrs{} } mmWaitForClickPipeState.defaultExpectation.paramPtrs.maxWaitSeconds = &maxWaitSeconds - mmWaitForClickPipeState.defaultExpectation.expectationOrigins.originMaxWaitSeconds = minimock.CallerInfo(1) return mmWaitForClickPipeState } @@ -16564,7 +15792,6 @@ func (mmWaitForClickPipeState *mClientMockWaitForClickPipeState) Return(cp1 *Cli mmWaitForClickPipeState.defaultExpectation = &ClientMockWaitForClickPipeStateExpectation{mock: mmWaitForClickPipeState.mock} } mmWaitForClickPipeState.defaultExpectation.results = &ClientMockWaitForClickPipeStateResults{cp1, err} - mmWaitForClickPipeState.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmWaitForClickPipeState.mock } @@ -16579,7 +15806,6 @@ func (mmWaitForClickPipeState *mClientMockWaitForClickPipeState) Set(f func(ctx } mmWaitForClickPipeState.mock.funcWaitForClickPipeState = f - mmWaitForClickPipeState.mock.funcWaitForClickPipeStateOrigin = minimock.CallerInfo(1) return mmWaitForClickPipeState.mock } @@ -16591,9 +15817,8 @@ func (mmWaitForClickPipeState *mClientMockWaitForClickPipeState) When(ctx contex } expectation := &ClientMockWaitForClickPipeStateExpectation{ - mock: mmWaitForClickPipeState.mock, - params: &ClientMockWaitForClickPipeStateParams{ctx, serviceId, clickPipeId, stateChecker, maxWaitSeconds}, - expectationOrigins: ClientMockWaitForClickPipeStateExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmWaitForClickPipeState.mock, + params: &ClientMockWaitForClickPipeStateParams{ctx, serviceId, clickPipeId, stateChecker, maxWaitSeconds}, } mmWaitForClickPipeState.expectations = append(mmWaitForClickPipeState.expectations, expectation) return expectation @@ -16611,7 +15836,6 @@ func (mmWaitForClickPipeState *mClientMockWaitForClickPipeState) Times(n uint64) mmWaitForClickPipeState.mock.t.Fatalf("Times of ClientMock.WaitForClickPipeState mock can not be zero") } mm_atomic.StoreUint64(&mmWaitForClickPipeState.expectedInvocations, n) - mmWaitForClickPipeState.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmWaitForClickPipeState } @@ -16631,8 +15855,6 @@ func (mmWaitForClickPipeState *ClientMock) WaitForClickPipeState(ctx context.Con mm_atomic.AddUint64(&mmWaitForClickPipeState.beforeWaitForClickPipeStateCounter, 1) defer mm_atomic.AddUint64(&mmWaitForClickPipeState.afterWaitForClickPipeStateCounter, 1) - mmWaitForClickPipeState.t.Helper() - if mmWaitForClickPipeState.inspectFuncWaitForClickPipeState != nil { mmWaitForClickPipeState.inspectFuncWaitForClickPipeState(ctx, serviceId, clickPipeId, stateChecker, maxWaitSeconds) } @@ -16661,33 +15883,27 @@ func (mmWaitForClickPipeState *ClientMock) WaitForClickPipeState(ctx context.Con if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForClickPipeState.WaitForClickPipeStateMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForClickPipeState.WaitForClickPipeStateMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.clickPipeId != nil && !minimock.Equal(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId) { - mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameter clickPipeId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForClickPipeState.WaitForClickPipeStateMock.defaultExpectation.expectationOrigins.originClickPipeId, *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) + mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameter clickPipeId, want: %#v, got: %#v%s\n", *mm_want_ptrs.clickPipeId, mm_got.clickPipeId, minimock.Diff(*mm_want_ptrs.clickPipeId, mm_got.clickPipeId)) } if mm_want_ptrs.stateChecker != nil && !minimock.Equal(*mm_want_ptrs.stateChecker, mm_got.stateChecker) { - mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameter stateChecker, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForClickPipeState.WaitForClickPipeStateMock.defaultExpectation.expectationOrigins.originStateChecker, *mm_want_ptrs.stateChecker, mm_got.stateChecker, minimock.Diff(*mm_want_ptrs.stateChecker, mm_got.stateChecker)) + mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameter stateChecker, want: %#v, got: %#v%s\n", *mm_want_ptrs.stateChecker, mm_got.stateChecker, minimock.Diff(*mm_want_ptrs.stateChecker, mm_got.stateChecker)) } if mm_want_ptrs.maxWaitSeconds != nil && !minimock.Equal(*mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds) { - mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameter maxWaitSeconds, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForClickPipeState.WaitForClickPipeStateMock.defaultExpectation.expectationOrigins.originMaxWaitSeconds, *mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds, minimock.Diff(*mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds)) + mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameter maxWaitSeconds, want: %#v, got: %#v%s\n", *mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds, minimock.Diff(*mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForClickPipeState.WaitForClickPipeStateMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmWaitForClickPipeState.t.Errorf("ClientMock.WaitForClickPipeState got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmWaitForClickPipeState.WaitForClickPipeStateMock.defaultExpectation.results @@ -16747,7 +15963,7 @@ func (m *ClientMock) MinimockWaitForClickPipeStateDone() bool { func (m *ClientMock) MinimockWaitForClickPipeStateInspect() { for _, e := range m.WaitForClickPipeStateMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.WaitForClickPipeState at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.WaitForClickPipeState with params: %#v", *e.params) } } @@ -16755,19 +15971,19 @@ func (m *ClientMock) MinimockWaitForClickPipeStateInspect() { // if default expectation was set then invocations count should be greater than zero if m.WaitForClickPipeStateMock.defaultExpectation != nil && afterWaitForClickPipeStateCounter < 1 { if m.WaitForClickPipeStateMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.WaitForClickPipeState at\n%s", m.WaitForClickPipeStateMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.WaitForClickPipeState") } else { - m.t.Errorf("Expected call to ClientMock.WaitForClickPipeState at\n%s with params: %#v", m.WaitForClickPipeStateMock.defaultExpectation.expectationOrigins.origin, *m.WaitForClickPipeStateMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.WaitForClickPipeState with params: %#v", *m.WaitForClickPipeStateMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcWaitForClickPipeState != nil && afterWaitForClickPipeStateCounter < 1 { - m.t.Errorf("Expected call to ClientMock.WaitForClickPipeState at\n%s", m.funcWaitForClickPipeStateOrigin) + m.t.Error("Expected call to ClientMock.WaitForClickPipeState") } if !m.WaitForClickPipeStateMock.invocationsDone() && afterWaitForClickPipeStateCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.WaitForClickPipeState at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.WaitForClickPipeStateMock.expectedInvocations), m.WaitForClickPipeStateMock.expectedInvocationsOrigin, afterWaitForClickPipeStateCounter) + m.t.Errorf("Expected %d calls to ClientMock.WaitForClickPipeState but found %d calls", + mm_atomic.LoadUint64(&m.WaitForClickPipeStateMock.expectedInvocations), afterWaitForClickPipeStateCounter) } } @@ -16780,19 +15996,16 @@ type mClientMockWaitForReversePrivateEndpointState struct { callArgs []*ClientMockWaitForReversePrivateEndpointStateParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockWaitForReversePrivateEndpointStateExpectation specifies expectation struct of the Client.WaitForReversePrivateEndpointState type ClientMockWaitForReversePrivateEndpointStateExpectation struct { - mock *ClientMock - params *ClientMockWaitForReversePrivateEndpointStateParams - paramPtrs *ClientMockWaitForReversePrivateEndpointStateParamPtrs - expectationOrigins ClientMockWaitForReversePrivateEndpointStateExpectationOrigins - results *ClientMockWaitForReversePrivateEndpointStateResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockWaitForReversePrivateEndpointStateParams + paramPtrs *ClientMockWaitForReversePrivateEndpointStateParamPtrs + results *ClientMockWaitForReversePrivateEndpointStateResults + Counter uint64 } // ClientMockWaitForReversePrivateEndpointStateParams contains parameters of the Client.WaitForReversePrivateEndpointState @@ -16819,16 +16032,6 @@ type ClientMockWaitForReversePrivateEndpointStateResults struct { err error } -// ClientMockWaitForReversePrivateEndpointStateOrigins contains origins of expectations of the Client.WaitForReversePrivateEndpointState -type ClientMockWaitForReversePrivateEndpointStateExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originReversePrivateEndpointId string - originStateChecker string - originMaxWaitSeconds string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -16854,7 +16057,6 @@ func (mmWaitForReversePrivateEndpointState *mClientMockWaitForReversePrivateEndp } mmWaitForReversePrivateEndpointState.defaultExpectation.params = &ClientMockWaitForReversePrivateEndpointStateParams{ctx, serviceId, reversePrivateEndpointId, stateChecker, maxWaitSeconds} - mmWaitForReversePrivateEndpointState.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmWaitForReversePrivateEndpointState.expectations { if minimock.Equal(e.params, mmWaitForReversePrivateEndpointState.defaultExpectation.params) { mmWaitForReversePrivateEndpointState.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmWaitForReversePrivateEndpointState.defaultExpectation.params) @@ -16882,7 +16084,6 @@ func (mmWaitForReversePrivateEndpointState *mClientMockWaitForReversePrivateEndp mmWaitForReversePrivateEndpointState.defaultExpectation.paramPtrs = &ClientMockWaitForReversePrivateEndpointStateParamPtrs{} } mmWaitForReversePrivateEndpointState.defaultExpectation.paramPtrs.ctx = &ctx - mmWaitForReversePrivateEndpointState.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmWaitForReversePrivateEndpointState } @@ -16905,7 +16106,6 @@ func (mmWaitForReversePrivateEndpointState *mClientMockWaitForReversePrivateEndp mmWaitForReversePrivateEndpointState.defaultExpectation.paramPtrs = &ClientMockWaitForReversePrivateEndpointStateParamPtrs{} } mmWaitForReversePrivateEndpointState.defaultExpectation.paramPtrs.serviceId = &serviceId - mmWaitForReversePrivateEndpointState.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmWaitForReversePrivateEndpointState } @@ -16928,7 +16128,6 @@ func (mmWaitForReversePrivateEndpointState *mClientMockWaitForReversePrivateEndp mmWaitForReversePrivateEndpointState.defaultExpectation.paramPtrs = &ClientMockWaitForReversePrivateEndpointStateParamPtrs{} } mmWaitForReversePrivateEndpointState.defaultExpectation.paramPtrs.reversePrivateEndpointId = &reversePrivateEndpointId - mmWaitForReversePrivateEndpointState.defaultExpectation.expectationOrigins.originReversePrivateEndpointId = minimock.CallerInfo(1) return mmWaitForReversePrivateEndpointState } @@ -16951,7 +16150,6 @@ func (mmWaitForReversePrivateEndpointState *mClientMockWaitForReversePrivateEndp mmWaitForReversePrivateEndpointState.defaultExpectation.paramPtrs = &ClientMockWaitForReversePrivateEndpointStateParamPtrs{} } mmWaitForReversePrivateEndpointState.defaultExpectation.paramPtrs.stateChecker = &stateChecker - mmWaitForReversePrivateEndpointState.defaultExpectation.expectationOrigins.originStateChecker = minimock.CallerInfo(1) return mmWaitForReversePrivateEndpointState } @@ -16974,7 +16172,6 @@ func (mmWaitForReversePrivateEndpointState *mClientMockWaitForReversePrivateEndp mmWaitForReversePrivateEndpointState.defaultExpectation.paramPtrs = &ClientMockWaitForReversePrivateEndpointStateParamPtrs{} } mmWaitForReversePrivateEndpointState.defaultExpectation.paramPtrs.maxWaitSeconds = &maxWaitSeconds - mmWaitForReversePrivateEndpointState.defaultExpectation.expectationOrigins.originMaxWaitSeconds = minimock.CallerInfo(1) return mmWaitForReversePrivateEndpointState } @@ -17000,7 +16197,6 @@ func (mmWaitForReversePrivateEndpointState *mClientMockWaitForReversePrivateEndp mmWaitForReversePrivateEndpointState.defaultExpectation = &ClientMockWaitForReversePrivateEndpointStateExpectation{mock: mmWaitForReversePrivateEndpointState.mock} } mmWaitForReversePrivateEndpointState.defaultExpectation.results = &ClientMockWaitForReversePrivateEndpointStateResults{rp1, err} - mmWaitForReversePrivateEndpointState.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmWaitForReversePrivateEndpointState.mock } @@ -17015,7 +16211,6 @@ func (mmWaitForReversePrivateEndpointState *mClientMockWaitForReversePrivateEndp } mmWaitForReversePrivateEndpointState.mock.funcWaitForReversePrivateEndpointState = f - mmWaitForReversePrivateEndpointState.mock.funcWaitForReversePrivateEndpointStateOrigin = minimock.CallerInfo(1) return mmWaitForReversePrivateEndpointState.mock } @@ -17027,9 +16222,8 @@ func (mmWaitForReversePrivateEndpointState *mClientMockWaitForReversePrivateEndp } expectation := &ClientMockWaitForReversePrivateEndpointStateExpectation{ - mock: mmWaitForReversePrivateEndpointState.mock, - params: &ClientMockWaitForReversePrivateEndpointStateParams{ctx, serviceId, reversePrivateEndpointId, stateChecker, maxWaitSeconds}, - expectationOrigins: ClientMockWaitForReversePrivateEndpointStateExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmWaitForReversePrivateEndpointState.mock, + params: &ClientMockWaitForReversePrivateEndpointStateParams{ctx, serviceId, reversePrivateEndpointId, stateChecker, maxWaitSeconds}, } mmWaitForReversePrivateEndpointState.expectations = append(mmWaitForReversePrivateEndpointState.expectations, expectation) return expectation @@ -17047,7 +16241,6 @@ func (mmWaitForReversePrivateEndpointState *mClientMockWaitForReversePrivateEndp mmWaitForReversePrivateEndpointState.mock.t.Fatalf("Times of ClientMock.WaitForReversePrivateEndpointState mock can not be zero") } mm_atomic.StoreUint64(&mmWaitForReversePrivateEndpointState.expectedInvocations, n) - mmWaitForReversePrivateEndpointState.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmWaitForReversePrivateEndpointState } @@ -17067,8 +16260,6 @@ func (mmWaitForReversePrivateEndpointState *ClientMock) WaitForReversePrivateEnd mm_atomic.AddUint64(&mmWaitForReversePrivateEndpointState.beforeWaitForReversePrivateEndpointStateCounter, 1) defer mm_atomic.AddUint64(&mmWaitForReversePrivateEndpointState.afterWaitForReversePrivateEndpointStateCounter, 1) - mmWaitForReversePrivateEndpointState.t.Helper() - if mmWaitForReversePrivateEndpointState.inspectFuncWaitForReversePrivateEndpointState != nil { mmWaitForReversePrivateEndpointState.inspectFuncWaitForReversePrivateEndpointState(ctx, serviceId, reversePrivateEndpointId, stateChecker, maxWaitSeconds) } @@ -17097,33 +16288,27 @@ func (mmWaitForReversePrivateEndpointState *ClientMock) WaitForReversePrivateEnd if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForReversePrivateEndpointState.WaitForReversePrivateEndpointStateMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForReversePrivateEndpointState.WaitForReversePrivateEndpointStateMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.reversePrivateEndpointId != nil && !minimock.Equal(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId) { - mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameter reversePrivateEndpointId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForReversePrivateEndpointState.WaitForReversePrivateEndpointStateMock.defaultExpectation.expectationOrigins.originReversePrivateEndpointId, *mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId, minimock.Diff(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId)) + mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameter reversePrivateEndpointId, want: %#v, got: %#v%s\n", *mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId, minimock.Diff(*mm_want_ptrs.reversePrivateEndpointId, mm_got.reversePrivateEndpointId)) } if mm_want_ptrs.stateChecker != nil && !minimock.Equal(*mm_want_ptrs.stateChecker, mm_got.stateChecker) { - mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameter stateChecker, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForReversePrivateEndpointState.WaitForReversePrivateEndpointStateMock.defaultExpectation.expectationOrigins.originStateChecker, *mm_want_ptrs.stateChecker, mm_got.stateChecker, minimock.Diff(*mm_want_ptrs.stateChecker, mm_got.stateChecker)) + mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameter stateChecker, want: %#v, got: %#v%s\n", *mm_want_ptrs.stateChecker, mm_got.stateChecker, minimock.Diff(*mm_want_ptrs.stateChecker, mm_got.stateChecker)) } if mm_want_ptrs.maxWaitSeconds != nil && !minimock.Equal(*mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds) { - mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameter maxWaitSeconds, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForReversePrivateEndpointState.WaitForReversePrivateEndpointStateMock.defaultExpectation.expectationOrigins.originMaxWaitSeconds, *mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds, minimock.Diff(*mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds)) + mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameter maxWaitSeconds, want: %#v, got: %#v%s\n", *mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds, minimock.Diff(*mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForReversePrivateEndpointState.WaitForReversePrivateEndpointStateMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmWaitForReversePrivateEndpointState.t.Errorf("ClientMock.WaitForReversePrivateEndpointState got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmWaitForReversePrivateEndpointState.WaitForReversePrivateEndpointStateMock.defaultExpectation.results @@ -17183,7 +16368,7 @@ func (m *ClientMock) MinimockWaitForReversePrivateEndpointStateDone() bool { func (m *ClientMock) MinimockWaitForReversePrivateEndpointStateInspect() { for _, e := range m.WaitForReversePrivateEndpointStateMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.WaitForReversePrivateEndpointState at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.WaitForReversePrivateEndpointState with params: %#v", *e.params) } } @@ -17191,19 +16376,19 @@ func (m *ClientMock) MinimockWaitForReversePrivateEndpointStateInspect() { // if default expectation was set then invocations count should be greater than zero if m.WaitForReversePrivateEndpointStateMock.defaultExpectation != nil && afterWaitForReversePrivateEndpointStateCounter < 1 { if m.WaitForReversePrivateEndpointStateMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.WaitForReversePrivateEndpointState at\n%s", m.WaitForReversePrivateEndpointStateMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.WaitForReversePrivateEndpointState") } else { - m.t.Errorf("Expected call to ClientMock.WaitForReversePrivateEndpointState at\n%s with params: %#v", m.WaitForReversePrivateEndpointStateMock.defaultExpectation.expectationOrigins.origin, *m.WaitForReversePrivateEndpointStateMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.WaitForReversePrivateEndpointState with params: %#v", *m.WaitForReversePrivateEndpointStateMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcWaitForReversePrivateEndpointState != nil && afterWaitForReversePrivateEndpointStateCounter < 1 { - m.t.Errorf("Expected call to ClientMock.WaitForReversePrivateEndpointState at\n%s", m.funcWaitForReversePrivateEndpointStateOrigin) + m.t.Error("Expected call to ClientMock.WaitForReversePrivateEndpointState") } if !m.WaitForReversePrivateEndpointStateMock.invocationsDone() && afterWaitForReversePrivateEndpointStateCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.WaitForReversePrivateEndpointState at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.WaitForReversePrivateEndpointStateMock.expectedInvocations), m.WaitForReversePrivateEndpointStateMock.expectedInvocationsOrigin, afterWaitForReversePrivateEndpointStateCounter) + m.t.Errorf("Expected %d calls to ClientMock.WaitForReversePrivateEndpointState but found %d calls", + mm_atomic.LoadUint64(&m.WaitForReversePrivateEndpointStateMock.expectedInvocations), afterWaitForReversePrivateEndpointStateCounter) } } @@ -17216,19 +16401,16 @@ type mClientMockWaitForServiceState struct { callArgs []*ClientMockWaitForServiceStateParams mutex sync.RWMutex - expectedInvocations uint64 - expectedInvocationsOrigin string + expectedInvocations uint64 } // ClientMockWaitForServiceStateExpectation specifies expectation struct of the Client.WaitForServiceState type ClientMockWaitForServiceStateExpectation struct { - mock *ClientMock - params *ClientMockWaitForServiceStateParams - paramPtrs *ClientMockWaitForServiceStateParamPtrs - expectationOrigins ClientMockWaitForServiceStateExpectationOrigins - results *ClientMockWaitForServiceStateResults - returnOrigin string - Counter uint64 + mock *ClientMock + params *ClientMockWaitForServiceStateParams + paramPtrs *ClientMockWaitForServiceStateParamPtrs + results *ClientMockWaitForServiceStateResults + Counter uint64 } // ClientMockWaitForServiceStateParams contains parameters of the Client.WaitForServiceState @@ -17252,15 +16434,6 @@ type ClientMockWaitForServiceStateResults struct { err error } -// ClientMockWaitForServiceStateOrigins contains origins of expectations of the Client.WaitForServiceState -type ClientMockWaitForServiceStateExpectationOrigins struct { - origin string - originCtx string - originServiceId string - originStateChecker string - originMaxWaitSeconds string -} - // Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning // the test will fail minimock's automatic final call check if the mocked method was not called at least once. // Optional() makes method check to work in '0 or more' mode. @@ -17286,7 +16459,6 @@ func (mmWaitForServiceState *mClientMockWaitForServiceState) Expect(ctx context. } mmWaitForServiceState.defaultExpectation.params = &ClientMockWaitForServiceStateParams{ctx, serviceId, stateChecker, maxWaitSeconds} - mmWaitForServiceState.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) for _, e := range mmWaitForServiceState.expectations { if minimock.Equal(e.params, mmWaitForServiceState.defaultExpectation.params) { mmWaitForServiceState.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmWaitForServiceState.defaultExpectation.params) @@ -17314,7 +16486,6 @@ func (mmWaitForServiceState *mClientMockWaitForServiceState) ExpectCtxParam1(ctx mmWaitForServiceState.defaultExpectation.paramPtrs = &ClientMockWaitForServiceStateParamPtrs{} } mmWaitForServiceState.defaultExpectation.paramPtrs.ctx = &ctx - mmWaitForServiceState.defaultExpectation.expectationOrigins.originCtx = minimock.CallerInfo(1) return mmWaitForServiceState } @@ -17337,7 +16508,6 @@ func (mmWaitForServiceState *mClientMockWaitForServiceState) ExpectServiceIdPara mmWaitForServiceState.defaultExpectation.paramPtrs = &ClientMockWaitForServiceStateParamPtrs{} } mmWaitForServiceState.defaultExpectation.paramPtrs.serviceId = &serviceId - mmWaitForServiceState.defaultExpectation.expectationOrigins.originServiceId = minimock.CallerInfo(1) return mmWaitForServiceState } @@ -17360,7 +16530,6 @@ func (mmWaitForServiceState *mClientMockWaitForServiceState) ExpectStateCheckerP mmWaitForServiceState.defaultExpectation.paramPtrs = &ClientMockWaitForServiceStateParamPtrs{} } mmWaitForServiceState.defaultExpectation.paramPtrs.stateChecker = &stateChecker - mmWaitForServiceState.defaultExpectation.expectationOrigins.originStateChecker = minimock.CallerInfo(1) return mmWaitForServiceState } @@ -17383,7 +16552,6 @@ func (mmWaitForServiceState *mClientMockWaitForServiceState) ExpectMaxWaitSecond mmWaitForServiceState.defaultExpectation.paramPtrs = &ClientMockWaitForServiceStateParamPtrs{} } mmWaitForServiceState.defaultExpectation.paramPtrs.maxWaitSeconds = &maxWaitSeconds - mmWaitForServiceState.defaultExpectation.expectationOrigins.originMaxWaitSeconds = minimock.CallerInfo(1) return mmWaitForServiceState } @@ -17409,7 +16577,6 @@ func (mmWaitForServiceState *mClientMockWaitForServiceState) Return(err error) * mmWaitForServiceState.defaultExpectation = &ClientMockWaitForServiceStateExpectation{mock: mmWaitForServiceState.mock} } mmWaitForServiceState.defaultExpectation.results = &ClientMockWaitForServiceStateResults{err} - mmWaitForServiceState.defaultExpectation.returnOrigin = minimock.CallerInfo(1) return mmWaitForServiceState.mock } @@ -17424,7 +16591,6 @@ func (mmWaitForServiceState *mClientMockWaitForServiceState) Set(f func(ctx cont } mmWaitForServiceState.mock.funcWaitForServiceState = f - mmWaitForServiceState.mock.funcWaitForServiceStateOrigin = minimock.CallerInfo(1) return mmWaitForServiceState.mock } @@ -17436,9 +16602,8 @@ func (mmWaitForServiceState *mClientMockWaitForServiceState) When(ctx context.Co } expectation := &ClientMockWaitForServiceStateExpectation{ - mock: mmWaitForServiceState.mock, - params: &ClientMockWaitForServiceStateParams{ctx, serviceId, stateChecker, maxWaitSeconds}, - expectationOrigins: ClientMockWaitForServiceStateExpectationOrigins{origin: minimock.CallerInfo(1)}, + mock: mmWaitForServiceState.mock, + params: &ClientMockWaitForServiceStateParams{ctx, serviceId, stateChecker, maxWaitSeconds}, } mmWaitForServiceState.expectations = append(mmWaitForServiceState.expectations, expectation) return expectation @@ -17456,7 +16621,6 @@ func (mmWaitForServiceState *mClientMockWaitForServiceState) Times(n uint64) *mC mmWaitForServiceState.mock.t.Fatalf("Times of ClientMock.WaitForServiceState mock can not be zero") } mm_atomic.StoreUint64(&mmWaitForServiceState.expectedInvocations, n) - mmWaitForServiceState.expectedInvocationsOrigin = minimock.CallerInfo(1) return mmWaitForServiceState } @@ -17476,8 +16640,6 @@ func (mmWaitForServiceState *ClientMock) WaitForServiceState(ctx context.Context mm_atomic.AddUint64(&mmWaitForServiceState.beforeWaitForServiceStateCounter, 1) defer mm_atomic.AddUint64(&mmWaitForServiceState.afterWaitForServiceStateCounter, 1) - mmWaitForServiceState.t.Helper() - if mmWaitForServiceState.inspectFuncWaitForServiceState != nil { mmWaitForServiceState.inspectFuncWaitForServiceState(ctx, serviceId, stateChecker, maxWaitSeconds) } @@ -17506,28 +16668,23 @@ func (mmWaitForServiceState *ClientMock) WaitForServiceState(ctx context.Context if mm_want_ptrs != nil { if mm_want_ptrs.ctx != nil && !minimock.Equal(*mm_want_ptrs.ctx, mm_got.ctx) { - mmWaitForServiceState.t.Errorf("ClientMock.WaitForServiceState got unexpected parameter ctx, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForServiceState.WaitForServiceStateMock.defaultExpectation.expectationOrigins.originCtx, *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) + mmWaitForServiceState.t.Errorf("ClientMock.WaitForServiceState got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx)) } if mm_want_ptrs.serviceId != nil && !minimock.Equal(*mm_want_ptrs.serviceId, mm_got.serviceId) { - mmWaitForServiceState.t.Errorf("ClientMock.WaitForServiceState got unexpected parameter serviceId, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForServiceState.WaitForServiceStateMock.defaultExpectation.expectationOrigins.originServiceId, *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) + mmWaitForServiceState.t.Errorf("ClientMock.WaitForServiceState got unexpected parameter serviceId, want: %#v, got: %#v%s\n", *mm_want_ptrs.serviceId, mm_got.serviceId, minimock.Diff(*mm_want_ptrs.serviceId, mm_got.serviceId)) } if mm_want_ptrs.stateChecker != nil && !minimock.Equal(*mm_want_ptrs.stateChecker, mm_got.stateChecker) { - mmWaitForServiceState.t.Errorf("ClientMock.WaitForServiceState got unexpected parameter stateChecker, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForServiceState.WaitForServiceStateMock.defaultExpectation.expectationOrigins.originStateChecker, *mm_want_ptrs.stateChecker, mm_got.stateChecker, minimock.Diff(*mm_want_ptrs.stateChecker, mm_got.stateChecker)) + mmWaitForServiceState.t.Errorf("ClientMock.WaitForServiceState got unexpected parameter stateChecker, want: %#v, got: %#v%s\n", *mm_want_ptrs.stateChecker, mm_got.stateChecker, minimock.Diff(*mm_want_ptrs.stateChecker, mm_got.stateChecker)) } if mm_want_ptrs.maxWaitSeconds != nil && !minimock.Equal(*mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds) { - mmWaitForServiceState.t.Errorf("ClientMock.WaitForServiceState got unexpected parameter maxWaitSeconds, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForServiceState.WaitForServiceStateMock.defaultExpectation.expectationOrigins.originMaxWaitSeconds, *mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds, minimock.Diff(*mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds)) + mmWaitForServiceState.t.Errorf("ClientMock.WaitForServiceState got unexpected parameter maxWaitSeconds, want: %#v, got: %#v%s\n", *mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds, minimock.Diff(*mm_want_ptrs.maxWaitSeconds, mm_got.maxWaitSeconds)) } } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { - mmWaitForServiceState.t.Errorf("ClientMock.WaitForServiceState got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", - mmWaitForServiceState.WaitForServiceStateMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + mmWaitForServiceState.t.Errorf("ClientMock.WaitForServiceState got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) } mm_results := mmWaitForServiceState.WaitForServiceStateMock.defaultExpectation.results @@ -17587,7 +16744,7 @@ func (m *ClientMock) MinimockWaitForServiceStateDone() bool { func (m *ClientMock) MinimockWaitForServiceStateInspect() { for _, e := range m.WaitForServiceStateMock.expectations { if mm_atomic.LoadUint64(&e.Counter) < 1 { - m.t.Errorf("Expected call to ClientMock.WaitForServiceState at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + m.t.Errorf("Expected call to ClientMock.WaitForServiceState with params: %#v", *e.params) } } @@ -17595,19 +16752,19 @@ func (m *ClientMock) MinimockWaitForServiceStateInspect() { // if default expectation was set then invocations count should be greater than zero if m.WaitForServiceStateMock.defaultExpectation != nil && afterWaitForServiceStateCounter < 1 { if m.WaitForServiceStateMock.defaultExpectation.params == nil { - m.t.Errorf("Expected call to ClientMock.WaitForServiceState at\n%s", m.WaitForServiceStateMock.defaultExpectation.returnOrigin) + m.t.Error("Expected call to ClientMock.WaitForServiceState") } else { - m.t.Errorf("Expected call to ClientMock.WaitForServiceState at\n%s with params: %#v", m.WaitForServiceStateMock.defaultExpectation.expectationOrigins.origin, *m.WaitForServiceStateMock.defaultExpectation.params) + m.t.Errorf("Expected call to ClientMock.WaitForServiceState with params: %#v", *m.WaitForServiceStateMock.defaultExpectation.params) } } // if func was set then invocations count should be greater than zero if m.funcWaitForServiceState != nil && afterWaitForServiceStateCounter < 1 { - m.t.Errorf("Expected call to ClientMock.WaitForServiceState at\n%s", m.funcWaitForServiceStateOrigin) + m.t.Error("Expected call to ClientMock.WaitForServiceState") } if !m.WaitForServiceStateMock.invocationsDone() && afterWaitForServiceStateCounter > 0 { - m.t.Errorf("Expected %d calls to ClientMock.WaitForServiceState at\n%s but found %d calls", - mm_atomic.LoadUint64(&m.WaitForServiceStateMock.expectedInvocations), m.WaitForServiceStateMock.expectedInvocationsOrigin, afterWaitForServiceStateCounter) + m.t.Errorf("Expected %d calls to ClientMock.WaitForServiceState but found %d calls", + mm_atomic.LoadUint64(&m.WaitForServiceStateMock.expectedInvocations), afterWaitForServiceStateCounter) } } @@ -17683,6 +16840,8 @@ func (m *ClientMock) MinimockFinish() { m.MinimockRevokeGrantRoleInspect() + m.MinimockRotateTDEKeyInspect() + m.MinimockScalingClickPipeInspect() m.MinimockSyncDatabaseInspect() @@ -17761,6 +16920,7 @@ func (m *ClientMock) minimockDone() bool { m.MinimockListReversePrivateEndpointsDone() && m.MinimockRevokeGrantPrivilegeDone() && m.MinimockRevokeGrantRoleDone() && + m.MinimockRotateTDEKeyDone() && m.MinimockScalingClickPipeDone() && m.MinimockSyncDatabaseDone() && m.MinimockUpdateBackupConfigurationDone() && diff --git a/pkg/internal/api/interface.go b/pkg/internal/api/interface.go index 35e8227..0c522e3 100644 --- a/pkg/internal/api/interface.go +++ b/pkg/internal/api/interface.go @@ -19,6 +19,7 @@ type Client interface { UpdateOrganizationPrivateEndpoints(ctx context.Context, orgUpdate OrganizationUpdate) (*[]PrivateEndpoint, error) GetBackupConfiguration(ctx context.Context, serviceId string) (*BackupConfiguration, error) UpdateBackupConfiguration(ctx context.Context, serviceId string, b BackupConfiguration) (*BackupConfiguration, error) + RotateTDEKey(ctx context.Context, serviceId string, keyId string) error GetQueryEndpoint(ctx context.Context, serviceID string) (*ServiceQueryEndpoint, error) CreateQueryEndpoint(ctx context.Context, serviceID string, endpoint ServiceQueryEndpoint) (*ServiceQueryEndpoint, error) diff --git a/pkg/internal/api/models.go b/pkg/internal/api/models.go index 8273336..edf97f4 100644 --- a/pkg/internal/api/models.go +++ b/pkg/internal/api/models.go @@ -62,7 +62,9 @@ type Service struct { PrivateEndpointIds []string `json:"privateEndpointIds,omitempty"` EncryptionKey string `json:"encryptionKey,omitempty"` EncryptionAssumedRoleIdentifier string `json:"encryptionAssumedRoleIdentifier,omitempty"` - HasTransparentDataEncryption *bool `json:"hasTransparentDataEncryption,omitempty"` + HasTransparentDataEncryption bool `json:"hasTransparentDataEncryption,omitempty"` + TransparentEncryptionDataKeyID string `json:"transparentDataEncryptionKeyId,omitempty"` + EncryptionRoleID string `json:"encryptionRoleId,omitempty"` BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` ReleaseChannel string `json:"releaseChannel,omitempty"` QueryAPIEndpoints *ServiceQueryEndpoint `json:"-"` @@ -76,6 +78,10 @@ type ServiceUpdate struct { Endpoints []Endpoint `json:"endpoints,omitempty"` } +type ServiceKeyRotation struct { + TransparentDataEncryptionKeyId string `json:"transparentDataEncryptionKeyId"` +} + // FixMemoryBounds ensures the MinTotalMemoryGb and MaxTotalMemoryGb fields are set before doing an API call to create the service // This is needed because there is a different interface between the /replicaScaling and the service creation API calls. func (s *Service) FixMemoryBounds() { diff --git a/pkg/internal/api/service.go b/pkg/internal/api/service.go index cfd1c32..86d4ba9 100644 --- a/pkg/internal/api/service.go +++ b/pkg/internal/api/service.go @@ -225,3 +225,28 @@ func (c *ClientImpl) DeleteService(ctx context.Context, serviceId string) (*Serv return &serviceResponse.Result.Service, nil } + +func (c *ClientImpl) RotateTDEKey(ctx context.Context, serviceId string, keyId string) error { + rb, err := json.Marshal(ServiceKeyRotation{TransparentDataEncryptionKeyId: keyId}) + if err != nil { + return err + } + + req, err := http.NewRequest(http.MethodPatch, c.getServicePath(serviceId, ""), strings.NewReader(string(rb))) + if err != nil { + return err + } + + body, err := c.doRequest(ctx, req) + if err != nil { + return err + } + + serviceResponse := ResponseWithResult[Service]{} + err = json.Unmarshal(body, &serviceResponse) + if err != nil { + return err + } + + return nil +} diff --git a/pkg/resource/descriptions/service_transparent_data_encryption_key_association.md b/pkg/resource/descriptions/service_transparent_data_encryption_key_association.md new file mode 100644 index 0000000..a20191a --- /dev/null +++ b/pkg/resource/descriptions/service_transparent_data_encryption_key_association.md @@ -0,0 +1,2 @@ +You can use the *clickhouse_service_transparent_data_encryption_key_association* resource to associate your own Encryption Key with a Clickhouse Service with the Transparent Data Encryption (TDE) feature enabled. +Please note that this feature requires an organization with the `Enterprise` plan. diff --git a/pkg/resource/models/service_resource.go b/pkg/resource/models/service_resource.go index fd8bac9..b8a1046 100644 --- a/pkg/resource/models/service_resource.go +++ b/pkg/resource/models/service_resource.go @@ -133,6 +133,27 @@ func (e OptionalEndpoint) ObjectValue() basetypes.ObjectValue { }) } +type TransparentEncryptionData struct { + Enabled types.Bool `tfsdk:"enabled"` + RoleID types.String `tfsdk:"role_id"` +} + +func (t TransparentEncryptionData) ObjectType() types.ObjectType { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enabled": types.BoolType, + "role_id": types.StringType, + }, + } +} + +func (t TransparentEncryptionData) ObjectValue() basetypes.ObjectValue { + return types.ObjectValueMust(t.ObjectType().AttrTypes, map[string]attr.Value{ + "enabled": t.Enabled, + "role_id": t.RoleID, + }) +} + type QueryAPIEndpoints struct { APIKeyIDs types.List `tfsdk:"api_key_ids"` Roles types.List `tfsdk:"roles"` @@ -208,7 +229,7 @@ type ServiceResourceModel struct { PrivateEndpointConfig types.Object `tfsdk:"private_endpoint_config"` EncryptionKey types.String `tfsdk:"encryption_key"` EncryptionAssumedRoleIdentifier types.String `tfsdk:"encryption_assumed_role_identifier"` - HasTransparentDataEncryption types.Bool `tfsdk:"has_transparent_data_encryption"` + TransparentEncryptionData types.Object `tfsdk:"transparent_data_encryption"` QueryAPIEndpoints types.Object `tfsdk:"query_api_endpoints"` BackupConfiguration types.Object `tfsdk:"backup_configuration"` } @@ -237,7 +258,7 @@ func (m *ServiceResourceModel) Equals(b ServiceResourceModel) bool { !m.PrivateEndpointConfig.Equal(b.PrivateEndpointConfig) || !m.EncryptionKey.Equal(b.EncryptionKey) || !m.EncryptionAssumedRoleIdentifier.Equal(b.EncryptionAssumedRoleIdentifier) || - !m.HasTransparentDataEncryption.Equal(b.HasTransparentDataEncryption) || + !m.TransparentEncryptionData.Equal(b.TransparentEncryptionData) || !m.IpAccessList.Equal(b.IpAccessList) || !m.QueryAPIEndpoints.Equal(b.QueryAPIEndpoints) || !m.BackupConfiguration.Equal(b.BackupConfiguration) { diff --git a/pkg/resource/models/service_transparent_data_encryption_key_association.go b/pkg/resource/models/service_transparent_data_encryption_key_association.go new file mode 100644 index 0000000..ece7925 --- /dev/null +++ b/pkg/resource/models/service_transparent_data_encryption_key_association.go @@ -0,0 +1,10 @@ +package models + +import ( + "github.com/hashicorp/terraform-plugin-framework/types" +) + +type ServiceTransparentDataEncryptionKeyAssociation struct { + ServiceID types.String `tfsdk:"service_id"` + KeyID types.String `tfsdk:"key_id"` +} diff --git a/pkg/resource/register_debug.go b/pkg/resource/register_debug.go index aef8121..e9ad829 100644 --- a/pkg/resource/register_debug.go +++ b/pkg/resource/register_debug.go @@ -11,6 +11,7 @@ func GetResourceFactories() []func() upstreamresource.Resource { NewServiceResource, NewPrivateEndpointRegistrationResource, NewServicePrivateEndpointsAttachmentResource, + NewServiceTransparentDataEncryptionKeyAssociationResource, NewDatabaseResource, NewClickPipeResource, NewClickPipeReversePrivateEndpointResource, diff --git a/pkg/resource/register_stable.go b/pkg/resource/register_stable.go index e2c6992..e4b3b2c 100644 --- a/pkg/resource/register_stable.go +++ b/pkg/resource/register_stable.go @@ -11,5 +11,6 @@ func GetResourceFactories() []func() upstreamresource.Resource { NewServiceResource, NewPrivateEndpointRegistrationResource, NewServicePrivateEndpointsAttachmentResource, + NewServiceTransparentDataEncryptionKeyAssociationResource, } } diff --git a/pkg/resource/service.go b/pkg/resource/service.go index 00d700b..b8e8ca3 100644 --- a/pkg/resource/service.go +++ b/pkg/resource/service.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework-validators/boolvalidator" "github.com/hashicorp/terraform-plugin-framework-validators/int32validator" + "github.com/hashicorp/terraform-plugin-framework-validators/objectvalidator" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" @@ -335,13 +336,24 @@ func (r *ServiceResource) Schema(_ context.Context, _ resource.SchemaRequest, re Description: "Custom role identifier ARN.", Optional: true, }, - "has_transparent_data_encryption": schema.BoolAttribute{ - Description: "If true, the Transparent Data Encryption (TDE) feature is enabled in the service. Only supported in AWS and GCP. Requires an organization with the Enterprise plan.", + "transparent_data_encryption": schema.SingleNestedAttribute{ + Description: "Configuration of the Transparent Data Encryption (TDE) feature. Requires an organization with the Enterprise plan.", Optional: true, - Computed: true, - PlanModifiers: []planmodifier.Bool{ - boolplanmodifier.UseStateForUnknown(), - boolplanmodifier.RequiresReplace(), + Attributes: map[string]schema.Attribute{ + "role_id": schema.StringAttribute{ + Computed: true, + Description: "ID of Role to be used for granting access to the Encryption Key. This is an ARN for AWS services and a Service Account Identifier for GCP.", + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "enabled": schema.BoolAttribute{ + Required: true, + Description: "If true, TDE is enabled for the service.", + }, + }, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{path.MatchRoot("warehouse_id")}...), }, }, "query_api_endpoints": schema.SingleNestedAttribute{ @@ -518,6 +530,43 @@ func (r *ServiceResource) ModifyPlan(ctx context.Context, req resource.ModifyPla ) } } + + var isEnabled, wantEnabled bool + { + if !state.TransparentEncryptionData.IsNull() { + stateTDE := models.TransparentEncryptionData{} + state.TransparentEncryptionData.As(ctx, &stateTDE, basetypes.ObjectAsOptions{UnhandledNullAsEmpty: false, UnhandledUnknownAsEmpty: false}) + isEnabled = stateTDE.Enabled.ValueBool() + } else { + isEnabled = false + } + + if !plan.TransparentEncryptionData.IsNull() && !plan.TransparentEncryptionData.IsUnknown() { + planTDE := models.TransparentEncryptionData{} + plan.TransparentEncryptionData.As(ctx, &planTDE, basetypes.ObjectAsOptions{UnhandledNullAsEmpty: false, UnhandledUnknownAsEmpty: false}) + wantEnabled = planTDE.Enabled.ValueBool() + } else { + wantEnabled = false + } + } + + // Attempt to disable TDE. + if isEnabled && !wantEnabled { + resp.Diagnostics.AddAttributeError( + path.Root("transparent_data_encryption.enabled"), + "Invalid Update", + "It is not possible to disable TDE (Transparend data encryption) on an existing service.", + ) + } + + // Attempt to enable TDE. + if !isEnabled && wantEnabled { + resp.Diagnostics.AddAttributeError( + path.Root("transparent_data_encryption.enabled"), + "Invalid Update", + "It is not possible to enable TDE (Transparend data encryption) on an existing service.", + ) + } } if plan.Tier.ValueString() == api.TierDevelopment { @@ -795,10 +844,13 @@ func (r *ServiceResource) Create(ctx context.Context, req resource.CreateRequest } } - if service.Tier == api.TierPPv2 { - if !plan.HasTransparentDataEncryption.IsUnknown() && !plan.HasTransparentDataEncryption.IsNull() { - service.HasTransparentDataEncryption = plan.HasTransparentDataEncryption.ValueBoolPointer() + if !plan.TransparentEncryptionData.IsNull() { + tde := &models.TransparentEncryptionData{} + diag := plan.TransparentEncryptionData.As(ctx, tde, basetypes.ObjectAsOptions{UnhandledNullAsEmpty: false, UnhandledUnknownAsEmpty: false}) + if diag.HasError() { + return } + service.HasTransparentDataEncryption = tde.Enabled.ValueBool() } service.IdleScaling = plan.IdleScaling.ValueBool() @@ -1823,10 +1875,13 @@ func (r *ServiceResource) syncServiceState(ctx context.Context, state *models.Se state.EncryptionAssumedRoleIdentifier = types.StringNull() } - if service.HasTransparentDataEncryption != nil { - state.HasTransparentDataEncryption = types.BoolValue(*service.HasTransparentDataEncryption) + if service.HasTransparentDataEncryption { + state.TransparentEncryptionData = models.TransparentEncryptionData{ + RoleID: types.StringValue(service.EncryptionRoleID), + Enabled: types.BoolValue(service.HasTransparentDataEncryption), + }.ObjectValue() } else { - state.HasTransparentDataEncryption = types.BoolNull() + state.TransparentEncryptionData = types.ObjectNull(models.TransparentEncryptionData{}.ObjectType().AttrTypes) } if service.QueryAPIEndpoints != nil { diff --git a/pkg/resource/service_test.go b/pkg/resource/service_test.go index 180f26d..e55d123 100644 --- a/pkg/resource/service_test.go +++ b/pkg/resource/service_test.go @@ -560,7 +560,7 @@ func getInitialState() models.ServiceResourceModel { EncryptionKey: types.StringNull(), EncryptionAssumedRoleIdentifier: types.StringNull(), BackupConfiguration: backupConfiguration, - HasTransparentDataEncryption: types.BoolValue(false), + TransparentEncryptionData: types.ObjectNull(models.TransparentEncryptionData{}.ObjectType().AttrTypes), } return state @@ -568,7 +568,6 @@ func getInitialState() models.ServiceResourceModel { func getBaseResponse(id string) api.Service { trueVal := true - falseVal := false return api.Service{ Id: id, IsPrimary: &trueVal, @@ -592,12 +591,13 @@ func getBaseResponse(id string) api.Service { }, // EncryptionKey: "", // EncryptionAssumedRoleIdentifier: "", - HasTransparentDataEncryption: &falseVal, BackupConfiguration: &api.BackupConfiguration{ BackupPeriodInHours: nil, BackupRetentionPeriodInHours: nil, BackupStartTime: nil, }, - ReleaseChannel: "default", + HasTransparentDataEncryption: false, + TransparentEncryptionDataKeyID: "", + ReleaseChannel: "default", } } diff --git a/pkg/resource/service_transparent_data_encryption_key_association.go b/pkg/resource/service_transparent_data_encryption_key_association.go new file mode 100644 index 0000000..70cd69a --- /dev/null +++ b/pkg/resource/service_transparent_data_encryption_key_association.go @@ -0,0 +1,256 @@ +package resource + +import ( + "context" + _ "embed" + "errors" + + "github.com/ClickHouse/terraform-provider-clickhouse/pkg/internal/api" + "github.com/ClickHouse/terraform-provider-clickhouse/pkg/resource/models" + + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +// Ensure the implementation satisfies the expected interfaces. +var ( + _ resource.Resource = &ServiceTransparentDataEncryptionKeyAssociationResource{} + _ resource.ResourceWithConfigure = &ServiceTransparentDataEncryptionKeyAssociationResource{} + _ resource.ResourceWithImportState = &ServiceTransparentDataEncryptionKeyAssociationResource{} +) + +//go:embed descriptions/service_transparent_data_encryption_key_association.md +var serviceTransparentDataEncryptionKeyAssociationResourceDescription string + +// NewServiceTransparentDataEncryptionKeyAssociationResource is a helper function to simplify the provider implementation. +func NewServiceTransparentDataEncryptionKeyAssociationResource() resource.Resource { + return &ServiceTransparentDataEncryptionKeyAssociationResource{} +} + +// ServiceTransparentDataEncryptionKeyAssociationResource is the resource implementation. +type ServiceTransparentDataEncryptionKeyAssociationResource struct { + client api.Client +} + +// Metadata returns the resource type name. +func (r *ServiceTransparentDataEncryptionKeyAssociationResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_service_transparent_data_encryption_key_association" +} + +// Schema defines the schema for the resource. +func (r *ServiceTransparentDataEncryptionKeyAssociationResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "service_id": schema.StringAttribute{ + Description: "ClickHouse Service ID", + Required: true, + }, + "key_id": schema.StringAttribute{ + Required: true, + Description: "ID of the Encryption key to use for data encryption. Must be an ARN for AWS services or a Key Resource Path for GCP services.", + }, + }, + MarkdownDescription: serviceTransparentDataEncryptionKeyAssociationResourceDescription, + } +} + +// Configure adds the provider configured client to the resource. +func (r *ServiceTransparentDataEncryptionKeyAssociationResource) Configure(_ context.Context, req resource.ConfigureRequest, _ *resource.ConfigureResponse) { + if req.ProviderData == nil { + return + } + + r.client = req.ProviderData.(api.Client) +} + +func (r *ServiceTransparentDataEncryptionKeyAssociationResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, resp *resource.ModifyPlanResponse) { + if req.Plan.Raw.IsNull() { + // If the entire plan is null, the resource is planned for destruction. + return + } + + var plan, state, config models.ServiceTransparentDataEncryptionKeyAssociation + diags := req.Plan.Get(ctx, &plan) + resp.Diagnostics.Append(diags...) + if !req.State.Raw.IsNull() { + diags = req.State.Get(ctx, &state) + resp.Diagnostics.Append(diags...) + } + if resp.Diagnostics.HasError() { + return + } + + if !req.Config.Raw.IsNull() { + diags = req.Config.Get(ctx, &config) + resp.Diagnostics.Append(diags...) + } + if resp.Diagnostics.HasError() { + return + } + + if !req.State.Raw.IsNull() { + // Validations for updates. + + return + } + + // Validations for new instances. +} + +// Create a new resource +func (r *ServiceTransparentDataEncryptionKeyAssociationResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + // Retrieve values from plan + var plan models.ServiceTransparentDataEncryptionKeyAssociation + diags := req.Plan.Get(ctx, &plan) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + // Check service has TDE enabled + svc, err := r.client.GetService(ctx, plan.ServiceID.ValueString()) + if err != nil { + resp.Diagnostics.AddError( + "Error checking if service has TDE enabled", + "Could not get service, unexpected error: "+err.Error(), + ) + return + } + + if !svc.HasTransparentDataEncryption { + resp.Diagnostics.AddError( + "Service has TDE disabled", + "Service does not have Transparent Data Encryption (TDE) feature enabled.", + ) + return + } + + err = r.client.RotateTDEKey(ctx, plan.ServiceID.ValueString(), plan.KeyID.ValueString()) + if err != nil { + resp.Diagnostics.AddError( + "Error creating TDE encryption key association", + "Could not create TDE encryption key association, unexpected error: "+err.Error(), + ) + return + } + + err = r.syncServiceState(ctx, &plan) + if err != nil { + resp.Diagnostics.AddError( + "Error syncing service state", + "Could not sync service state, unexpected error: "+err.Error(), + ) + return + } + + // Set state to fully populated data + diags = resp.State.Set(ctx, plan) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } +} + +// Read refreshes the Terraform state with the latest data. +func (r *ServiceTransparentDataEncryptionKeyAssociationResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var state models.ServiceTransparentDataEncryptionKeyAssociation + diags := req.State.Get(ctx, &state) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + err := r.syncServiceState(ctx, &state) + if err != nil { + resp.Diagnostics.AddError( + "Error syncing service state", + "Could not sync service state, unexpected error: "+err.Error(), + ) + return + } + + if state.ServiceID.IsNull() { + // Resource was deleted outside terraform + resp.State.RemoveResource(ctx) + } else { + // Set refreshed state + diags = resp.State.Set(ctx, state) + resp.Diagnostics.Append(diags...) + } +} + +// Update updates the resource and sets the updated Terraform state on success. +func (r *ServiceTransparentDataEncryptionKeyAssociationResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + // Retrieve values from plan + var plan, state models.ServiceTransparentDataEncryptionKeyAssociation + diags := req.Plan.Get(ctx, &plan) + resp.Diagnostics.Append(diags...) + diags = req.State.Get(ctx, &state) + resp.Diagnostics.Append(diags...) + + if resp.Diagnostics.HasError() { + return + } + + // TDE Key rotation + err := r.client.RotateTDEKey(ctx, plan.ServiceID.ValueString(), plan.KeyID.ValueString()) + if err != nil { + resp.Diagnostics.AddError( + "Error rotating TDE encryption key", + "Could not rotate TDE encryption, unexpected error: "+err.Error(), + ) + return + } + + err = r.syncServiceState(ctx, &plan) + if err != nil { + resp.Diagnostics.AddError( + "Error syncing service state", + "Could not sync service state, unexpected error: "+err.Error(), + ) + return + } + + diags = resp.State.Set(ctx, plan) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } +} + +// Delete deletes the resource and removes the Terraform state on success. +func (r *ServiceTransparentDataEncryptionKeyAssociationResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + // Deleting a TDE key association is not possible, but if we return an error here it would be impossible to tear down a service with an existing TDE association. + // We decided to implement a no-op instead, just removing the resource from the state. + // This is far from optimal, but the only solution we have so far. + resp.State.RemoveResource(ctx) +} + +func (r *ServiceTransparentDataEncryptionKeyAssociationResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + // Retrieve import ID and save to id attribute + resource.ImportStatePassthroughID(ctx, path.Root("service_id"), req, resp) +} + +// syncServiceState fetches the latest state ClickHouse Cloud API and updates the Terraform state. +func (r *ServiceTransparentDataEncryptionKeyAssociationResource) syncServiceState(ctx context.Context, state *models.ServiceTransparentDataEncryptionKeyAssociation) error { + if state.ServiceID.IsNull() { + return errors.New("service ID must be set to fetch the service") + } + + // Get latest service value from ClickHouse OpenAPI + service, err := r.client.GetService(ctx, state.ServiceID.ValueString()) + if api.IsNotFound(err) { + // Service was deleted outside terraform. + state.ServiceID = types.StringNull() + + return nil + } else if err != nil { + return err + } + + state.KeyID = types.StringValue(service.TransparentEncryptionDataKeyID) + + return nil +}